Class PhysicalFileInfo
- Namespace
- Acuit.Pinpoint.FileProviders.Physical
- Assembly
- Acuit.Pinpoint.Configuration.dll
Represents a file on a physical filesystem
public class PhysicalFileInfo : IFileInfo
- Inheritance
-
PhysicalFileInfo
- Implements
- Inherited Members
Constructors
PhysicalFileInfo(FileInfo)
Initializes an instance of PhysicalFileInfo that wraps an instance of FileInfo
public PhysicalFileInfo(FileInfo info)
Parameters
Properties
Exists
True if resource exists in the underlying storage system.
public bool Exists { get; }
Property Value
IsDirectory
Always false.
public bool IsDirectory { get; }
Property Value
LastModified
When the file was last modified
public DateTimeOffset LastModified { get; }
Property Value
Length
The length of the file in bytes, or -1 for a directory or non-existing files.
public long Length { get; }
Property Value
Name
The name of the file or directory, not including any path.
public string Name { get; }
Property Value
PhysicalPath
The path to the file, including the file name. Return null if the file is not directly accessible.
public string PhysicalPath { get; }
Property Value
Methods
CreateReadStream()
Return file contents as readonly stream. Caller should dispose stream when complete.
public Stream CreateReadStream()
Returns
- Stream
The file stream