Gorgon
Show / Hide Table of Contents

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 Source

CompressedLength

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.

| Edit this page View Source

CreateDate

Property to return the date of creation for the file.

Declaration
DateTime CreateDate { get; }
Property Value
Type Description
DateTime
| Edit this page View Source

FullPath

Property to return the full path to the physical file.

Declaration
string FullPath { get; }
Property Value
Type Description
string
| Edit this page View Source

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.

| Edit this page View Source

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.

| Edit this page View Source

Length

Property to return the length of the file, in bytes.

Declaration
long Length { get; }
Property Value
Type Description
long
| Edit this page View Source

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.

| Edit this page View Source

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.

| Edit this page View Source

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 Source

Refresh()

Function to refresh the file information.

Declaration
void Refresh()

Extension Methods

GorgonDebugExtensions.ValidateObject<T>(T, string)
GorgonNullExtensions.AsNullable<T>(object)
GorgonNullExtensions.IfNull<T>(object, T)
GorgonNullExtensions.IsNull(object)
  • Edit this page
  • View Source
In this article
Back to top Copyright 2023 - Licensed under the MIT license by Michael Winsor (Tape_Worm).
Send comments on this topic to the author