ReadOnlyFileSystemProvider.Exists Method
Namespace: Rebex.IO.FileSystem
Assembly: Rebex.FileSystem.dll (version 7.0.9083)
Exists(NodePath, NodeType)
Override this method to implement verification of existence of a FileNode or DirectoryNode.
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 bool Exists(NodePath path, NodeType nodeType)
Parameters
Type | Name | Description |
---|---|---|
NodePath | path | NodePath to be verified. |
NodeType | nodeType |
Returns
Type | Description |
---|---|
Boolean | True if the NodeBase can be found in the |
Examples
protected override bool Exists(NodePath path, NodeType nodeType)
{
var fullPath = getFullPath(path);
if (nodeType == NodeType.File)
{
return File.Exists(fullPath);
}
if (nodeType == NodeType.Directory)
{
return Directory.Exists(fullPath);
}
return false;
}