Class InMemoryFileSystemEntry
The base class for all in-memory file system entries.
Inherited Members
Namespace: FubarDev.FtpServer.FileSystem.InMemory
Assembly: FubarDev.FtpServer.FileSystem.InMemory.dll
Syntax
public abstract class InMemoryFileSystemEntry : IUnixFileSystemEntry, IUnixOwner
Constructors
| Improve this Doc View SourceInMemoryFileSystemEntry(Nullable<InMemoryDirectoryEntry>, String, IUnixPermissions)
Initializes a new instance of the InMemoryFileSystemEntry class.
Declaration
protected InMemoryFileSystemEntry(InMemoryDirectoryEntry? parent, string name, IUnixPermissions permissions)
Parameters
| Type | Name | Description |
|---|---|---|
| Nullable<InMemoryDirectoryEntry> | parent | The parent entry. |
| String | name | The name of this entry. |
| IUnixPermissions | permissions | The permissions of this entry. |
Properties
| Improve this Doc View SourceCreatedTime
Declaration
public DateTimeOffset? CreatedTime { get; }
Property Value
| Type | Description |
|---|---|
| Nullable<DateTimeOffset> |
Group
Declaration
public string Group { get; }
Property Value
| Type | Description |
|---|---|
| String |
LastWriteTime
Declaration
public DateTimeOffset? LastWriteTime { get; }
Property Value
| Type | Description |
|---|---|
| Nullable<DateTimeOffset> |
Name
Declaration
public string Name { get; }
Property Value
| Type | Description |
|---|---|
| String |
NumberOfLinks
Declaration
public long NumberOfLinks { get; }
Property Value
| Type | Description |
|---|---|
| Int64 |
Owner
Declaration
public string Owner { get; }
Property Value
| Type | Description |
|---|---|
| String |
Parent
Gets or sets the parent entry.
Declaration
public InMemoryDirectoryEntry? Parent { get; set; }
Property Value
| Type | Description |
|---|---|
| Nullable<InMemoryDirectoryEntry> |
Permissions
Declaration
public IUnixPermissions Permissions { get; }
Property Value
| Type | Description |
|---|---|
| IUnixPermissions |
Methods
| Improve this Doc View SourceSetCreateTime(DateTimeOffset)
Sets the creation time.
Declaration
public InMemoryFileSystemEntry SetCreateTime(DateTimeOffset timestamp)
Parameters
| Type | Name | Description |
|---|---|---|
| DateTimeOffset | timestamp | The new value of the creation time. |
Returns
| Type | Description |
|---|---|
| InMemoryFileSystemEntry | The changed file system entry. |
SetLastWriteTime(DateTimeOffset)
Sets the last write time.
Declaration
public InMemoryFileSystemEntry SetLastWriteTime(DateTimeOffset timestamp)
Parameters
| Type | Name | Description |
|---|---|---|
| DateTimeOffset | timestamp | The new value of the last write time. |
Returns
| Type | Description |
|---|---|
| InMemoryFileSystemEntry | The changed file system entry. |
WithOwner(IFtpUser)
Configure directory entry as owned by given user.
Declaration
[Obsolete("Use the overload with ClaimsPrincipal.")]
public InMemoryFileSystemEntry WithOwner(IFtpUser user)
Parameters
| Type | Name | Description |
|---|---|---|
| IFtpUser | user | The user that becomes the new owner of this directory entry. |
Returns
| Type | Description |
|---|---|
| InMemoryFileSystemEntry | The changed file system entry. |
WithOwner(ClaimsPrincipal)
Configure directory entry as owned by given user.
Declaration
public InMemoryFileSystemEntry WithOwner(ClaimsPrincipal user)
Parameters
| Type | Name | Description |
|---|---|---|
| ClaimsPrincipal | user | The user that becomes the new owner of this directory entry. |
Returns
| Type | Description |
|---|---|
| InMemoryFileSystemEntry | The changed file system entry. |