Rebex
Products Downloads Buy Support Contact
Show / Hide Table of Contents

ReadOnlyFileSystemProvider Class

Namespace: Rebex.IO.FileSystem
Assembly: Rebex.FileSystem.dll (version 7.0.9119)

Serves as the base class for read-only file system providers.

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.

Syntax
public abstract class ReadOnlyFileSystemProvider : FileSystemProvider, IDisposable
Inheritance
Object
FileSystemProvider
ReadOnlyFileSystemProvider
ReadWriteFileSystemProvider
Implements
IDisposable
Inherited Members
FileSystemProvider.Dispose()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()

Constructors

Name Description
ReadOnlyFileSystemProvider()

Initializes a new instance of ReadOnlyFileSystemProvider with the Default settings.

ReadOnlyFileSystemProvider(FileSystemProviderSettings)

Initializes a new instance of ReadOnlyFileSystemProvider with the fileSystemSettings.

Fields

Name Description
DefaultDirectoryContentLength

Constant represents default length of the content of a DirectoryNode.

The value of the constant is 0.

Properties

Name Description
OriginalSettings

Gets the original file system settings.

Root

Gets the root directory of this instance.

Settings

Gets the file system settings which were used to create this instance.

Methods

Name Description
Content(Stream)

Creates a new instance of NodeContent with the underlying contentStream.

Instances of ReadOnlyFileSystemProvider create new NodeContent using the CreateReadOnlyContent(Stream) method.

Instances of ReadWriteFileSystemProvider create new NodeContent using the CreateDelayedWriteContent(Stream) method.

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.

CreateChildFileSystem(NodePath)

Creates a child file system with the root path of directoryPath.

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting resources. Inherited from FileSystemProvider.

Dispose(Boolean)

Releases the resources used by the FileSystemProvider.

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.

GetAttributes(NodeBase)

Returns attributes (NodeAttributes) for the node.

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.

GetChild(String, DirectoryNode)

Override this method to implement retrieval of DirectoryNode or FileNode with the specified name located in the specified parent directory.

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.

GetChildren(DirectoryNode, NodeType)

Override this method to implement getting a collection of DirectoryNode and/or FileNode objects that are located in the parent and value of their property NodeType is contained in the nodeType.

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.

GetContent(NodeBase, NodeContentParameters)

Override this method to implement retrieval of the content for the node.

By default, this method is only called for files (instances of the class FileNode). To enable this method for directories (instances of DirectoryNode), add a new instance of FileSystemProviderSettings (with the property EnableGetContentMethodForDirectories set to true) to the ReadOnlyFileSystemProvider(FileSystemProviderSettings) constructor.

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.

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 FileNode). To enable this method for directories (instances of DirectoryNode), add a new instance of FileSystemProviderSettings (with the property EnableGetLengthMethodForDirectories set to true) to the ReadOnlyFileSystemProvider(FileSystemProviderSettings) constructor.

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.

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.

MakeNewDirectoryNode(String, DirectoryNode)

Factory method that creates a new instance of DirectoryNode with Name initialized to name and Parent initialized to parentNode. Classes derived from the ReadOnlyFileSystemProvider class or from the class ReadWriteFileSystemProvider can override this method and returns instance of the more specific class derived from 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.

MakeNewFileNode(String, DirectoryNode)

Factory method that creates a new instance of FileNode that will have Name initialized to name and Parent initialized to parentNode. Classes derived from the class ReadOnlyFileSystemProvider or from the class ReadWriteFileSystemProvider can override this method and returns instance of the more specific class derived from FileNode.

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.

Extension Methods

FileSystemProviderExtensions.AsVDriveInfo(FileSystemProvider)
FileSystemProviderExtensions.GetRootVDirectoryInfo(FileSystemProvider)
FileSystemNotificationExtensions.GetFileSystemNotifier(FileSystemProvider)

See Also

ReadWriteFileSystemProvider
FileSystemNotifier
FileSystemProviderExtensions
In This Article
© REBEX ČR s.r.o. Back to top
Privacy policy
Manage cookies