Class PortfolioFolderCollection
Folder entries at a portfolio root or nested folder scope.
Inherited Members
Namespace: DRIT.Pdf.EmbeddedFiles
Assembly: DRIT.Pdf.dll
Syntax
public sealed class PortfolioFolderCollection : IEnumerable<PortfolioFolder>, IEnumerable
Properties
Count
Gets the number of folders in this collection.
Declaration
public int Count { get; }
Property Value
| Type | Description |
|---|---|
| int |
this[int]
Gets the folder at the specified index.
Declaration
public PortfolioFolder this[int index] { get; }
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | The zero-based index. |
Property Value
| Type | Description |
|---|---|
| PortfolioFolder |
Methods
Add(string, bool)
Adds a folder and all its files from disk.
Declaration
public PortfolioFolder Add(string folderPath, bool recursive = false)
Parameters
| Type | Name | Description |
|---|---|---|
| string | folderPath | The path to the folder to add. |
| bool | recursive | Whether to include subfolders. Default is false. |
Returns
| Type | Description |
|---|---|
| PortfolioFolder | The created folder entry. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | Thrown when |
| DirectoryNotFoundException | Thrown when the folder does not exist. |
AddEmpty(string)
Adds an empty folder with the specified name.
Declaration
public PortfolioFolder AddEmpty(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | The folder name. |
Returns
| Type | Description |
|---|---|
| PortfolioFolder | The created folder entry. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException | Thrown when |
GetEnumerator()
Returns an enumerator for iterating over folders.
Declaration
public IEnumerator<PortfolioFolder> GetEnumerator()
Returns
| Type | Description |
|---|---|
| IEnumerator<PortfolioFolder> |