Class DirectoryListingEnumerator
Helps to enumerate a directory with virtual . and .. entries.
Inherited Members
Namespace: FubarDev.FtpServer.Utilities
Assembly: FubarDev.FtpServer.Abstractions.dll
Syntax
public class DirectoryListingEnumerator
Constructors
| Improve this Doc View SourceDirectoryListingEnumerator(IEnumerable<IUnixFileSystemEntry>, IUnixFileSystem, Stack<IUnixDirectoryEntry>, Boolean)
Initializes a new instance of the DirectoryListingEnumerator class.
Declaration
public DirectoryListingEnumerator(IEnumerable<IUnixFileSystemEntry> entries, IUnixFileSystem fileSystem, Stack<IUnixDirectoryEntry> pathEntries, bool returnDotEntries)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<IUnixFileSystemEntry> | entries | The file system entries to enumerate. |
| IUnixFileSystem | fileSystem | The file system of the file system entries. |
| Stack<IUnixDirectoryEntry> | pathEntries | The path entries of the current directory. |
| Boolean | returnDotEntries | when this enumerator should return the dot entries.
|
Properties
| Improve this Doc View SourceCurrentDirectory
Gets the current directory.
Declaration
public IUnixDirectoryEntry CurrentDirectory { get; }
Property Value
| Type | Description |
|---|---|
| IUnixDirectoryEntry |
Entry
Gets the file system entry.
Declaration
public IUnixFileSystemEntry Entry { get; }
Property Value
| Type | Description |
|---|---|
| IUnixFileSystemEntry |
FileSystem
Gets the file system of the entries to be enumerated.
Declaration
public IUnixFileSystem FileSystem { get; }
Property Value
| Type | Description |
|---|---|
| IUnixFileSystem |
GrandParentDirectory
Gets the grand parent directory.
Declaration
public IUnixDirectoryEntry? GrandParentDirectory { get; }
Property Value
| Type | Description |
|---|---|
| Nullable<IUnixDirectoryEntry> |
IsDotEntry
Gets a value indicating whether the current entry is either the . or .. entry.
Declaration
public bool IsDotEntry { get; }
Property Value
| Type | Description |
|---|---|
| Boolean |
Name
Gets the name of the entry which might be different from the original entries name.
Declaration
public string Name { get; }
Property Value
| Type | Description |
|---|---|
| String |
ParentDirectory
Gets the parent directory.
Declaration
public IUnixDirectoryEntry? ParentDirectory { get; }
Property Value
| Type | Description |
|---|---|
| Nullable<IUnixDirectoryEntry> |
Methods
| Improve this Doc View SourceGetFullPath(String)
Gets the full path for a given name.
Declaration
public string GetFullPath(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| String | name | The name to get the full path for. |
Returns
| Type | Description |
|---|---|
| String | The full path. |
MoveNext()
Called to enumerate the next directory listing entry.
Declaration
public bool MoveNext()
Returns
| Type | Description |
|---|---|
| Boolean | when there is a value for Entry and Name.
|