ReadOnlyFileSystemProvider.GetLength Method
Namespace: Rebex.IO.FileSystem
Assembly: Rebex.FileSystem.dll (version 7.0.9147)
GetLength(NodeBase)
Override this method to implement retrieval of the length of the content for the node
.
By default, this method is only called for files (instances of the class File
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 long GetLength(NodeBase node)
Parameters
Type | Name | Description |
---|---|---|
Node |
node | Processed node. |
Returns
Type | Description |
---|---|
Int64 | Length of the content for the |
Examples
protected override long GetLength(NodeBase node)
{
var fullPath = getFullPath(node.Path);
return new FileInfo(fullPath).Length;
}