ReadOnlyFileSystemProvider.GetTimeInfo Method
Namespace: Rebex.IO.FileSystem
Assembly: Rebex.FileSystem.dll (version 7.0.9083)
GetTimeInfo(NodeBase)
Override this method to implement retrieval of NodeTimeInfo for the node
.
Fill the following NodeTimeInfo properties:
CreationTime.
AccessTime.
LastWriteTime.
When the virtual file system is used in the FileServer component, the server session, which contains information about the user and the active connection, can be accessed using Current property.
Declaration
protected abstract NodeTimeInfo GetTimeInfo(NodeBase node)
Parameters
Type | Name | Description |
---|---|---|
NodeBase | node | A DirectoryNode or a FileNode instance that represents the processed node. |
Returns
Type | Description |
---|---|
NodeTimeInfo | NodeTimeInfo with the properties CreationTime, LastAccessTime
and LastWriteTime filled with the values for the All dates are in the UTC format. |
Examples
protected override NodeTimeInfo GetTimeInfo(NodeBase node)
{
var fullPath = getFullPath(node.Path);
var creationTime = File.GetCreationTime(fullPath);
var lastAccessTime = File.GetLastAccessTime(fullPath);
var lastWriteTime = File.GetLastWriteTime(fullPath);
return new NodeTimeInfo(creationTime,
lastAccessTime,
lastWriteTime);
}