Interface IGorgonPhysicalFileInfo
Provides information about a file stored in a physical file system.
Namespace: Gorgon.IO.Providers
Assembly: Gorgon.FileSystem.dll
Syntax
public interface IGorgonPhysicalFileInfo
Properties
| Edit this page View SourceCompressedLength
Property to return the compressed size of the file, in bytes.
Declaration
long? CompressedLength { get; }
Property Value
Type | Description |
---|---|
long? |
Remarks
Some providers will compress files, and the actual size will not match the Length property. This property will return the true size of the file in the physical file system.
For file system providers that do not support compression, this value will be null.
CreateDate
Property to return the date of creation for the file.
Declaration
DateTime CreateDate { get; }
Property Value
Type | Description |
---|---|
DateTime |
FullPath
Property to return the full path to the physical file.
Declaration
string FullPath { get; }
Property Value
Type | Description |
---|---|
string |
IsEncrypted
Property to return whether the file is encrypted or not.
Declaration
bool IsEncrypted { get; }
Property Value
Type | Description |
---|---|
bool |
Remarks
Some providers will encrypt file contents. When a file is known to be encrypted, this value will return true; otherwise, false.
For file system providers that do not support encryption, this value return false.
LastModifiedDate
Property to return the date of when the file was last modified.
Declaration
DateTime LastModifiedDate { get; }
Property Value
Type | Description |
---|---|
DateTime |
Remarks
Some providers will not support a last modified date on files, and in those cases, the provider should return the CreateDate here.
Length
Property to return the length of the file, in bytes.
Declaration
long Length { get; }
Property Value
Type | Description |
---|---|
long |
Name
Property to return the name of the file.
Declaration
string Name { get; }
Property Value
Type | Description |
---|---|
string |
Remarks
This is the file name and extension for the file without the directory.
Offset
Property to return the offset, in bytes, of the file within a packed file.
Declaration
long Offset { get; }
Property Value
Type | Description |
---|---|
long |
Remarks
This value will always be 0 for a file located on the physical file system of the operating system.
VirtualPath
Property to return the virtual path for the file.
Declaration
string VirtualPath { get; }
Property Value
Type | Description |
---|---|
string |
Remarks
This is the path to the file within a IGorgonFileSystem. For example, the file c:\Mount\MyFile.txt
would be mapped to /Mount/MyFile.txt
.
Methods
| Edit this page View SourceRefresh()
Function to refresh the file information.
Declaration
void Refresh()