Class FileSetupBase
This abstract base class provides properties and a default constructor signature for concrete file setup classes.
Inheritance
Namespace: TeleScope.Persistence.Abstractions
Assembly: TeleScope.Persistence.Abstractions.dll
Syntax
public abstract class FileSetupBase : object
Constructors
| Improve this Doc View SourceFileSetupBase(FileInfo, WritePermissions)
The constructor sets the file propterties and the WritePermissions.
Declaration
protected FileSetupBase(FileInfo fileInfo, WritePermissions permissions = default(WritePermissions))
Parameters
Type | Name | Description |
---|---|---|
FileInfo | fileInfo | The information about the file that will get accessed by a file storage. |
WritePermissions | permissions | The information about the write permissions. |
FileSetupBase(String, WritePermissions)
The constructor sets the file propterties and the WritePermissions.
Declaration
protected FileSetupBase(string file, WritePermissions permissions = default(WritePermissions))
Parameters
Type | Name | Description |
---|---|---|
System.String | file | The file that will get accessed by a file storage. |
WritePermissions | permissions | The information about the write permissions. |
Properties
| Improve this Doc View SourceExists
Gets the information if the file info instance exists or not.
Declaration
public bool Exists { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Extension
Gets the extension or type of the file.
Declaration
public string Extension { get; }
Property Value
Type | Description |
---|---|
System.String |
File
Gets the complete filenmane with path and the extension of the file.
Declaration
public string File { get; }
Property Value
Type | Description |
---|---|
System.String |
Filename
Gets the name of the file.
Declaration
public string Filename { get; }
Property Value
Type | Description |
---|---|
System.String |
Location
Gets the complete path, where the file is located.
Declaration
public string Location { get; }
Property Value
Type | Description |
---|---|
System.String |
Permissions
Gets the flags of permissions how files may be treated.
Declaration
public WritePermissions Permissions { get; set; }
Property Value
Type | Description |
---|---|
WritePermissions |
Methods
| Improve this Doc View SourceInfo()
Gets the reference to the FileInfo object, that was given to the constructor.
Declaration
public FileInfo Info()
Returns
Type | Description |
---|---|
FileInfo |
SetFile(FileInfo)
Sets or updates the reference to the FileInfo object.
Declaration
public void SetFile(FileInfo fileInfo)
Parameters
Type | Name | Description |
---|---|---|
FileInfo | fileInfo | The new FileInfo object. |