IFileSystemProvider
Wisej.Core.IFileSystemProvider
Namespace: Wisej.Core
Assembly: Wisej.Framework (2.5.0.0)
Abstracts access to the file system. Implementations of this interface are used by the file dialogs and other components that need to interact with the file system. Wisej provides the built-in default implementation for the standard disk-based file system and a number of alternative implementations in the Wisej extensions, such as: Amazon S3, Google Drive, and Microsoft OneDrive.
Properties
Icon
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%252Finstance.png%3Falt%3Dmedia%26token%3D060b281d-9363-48a1-a0f9-788ad1831e96&width=300&dpr=4&quality=100&sign=2218e05e&sv=1)
Image: Returns or sets the icon that represents the file system.
IconSource
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%252Finstance.png%3Falt%3Dmedia%26token%3D060b281d-9363-48a1-a0f9-788ad1831e96&width=300&dpr=4&quality=100&sign=2218e05e&sv=1)
String: Returns or sets the icon name or URL that represents the file system.
Name
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%252Finstance.png%3Falt%3Dmedia%26token%3D060b281d-9363-48a1-a0f9-788ad1831e96&width=300&dpr=4&quality=100&sign=2218e05e&sv=1)
String: Returns or sets the name of this root. This is the name that should be shown to the user.
Root
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%252Finstance.png%3Falt%3Dmedia%26token%3D060b281d-9363-48a1-a0f9-788ad1831e96&width=300&dpr=4&quality=100&sign=2218e05e&sv=1)
String: Returns or sets the root path for the file system. All file system operations in the implementation class are expected to be limited to the root.
Methods
Contains(path)
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%252Finstance.png%3Falt%3Dmedia%26token%3D060b281d-9363-48a1-a0f9-788ad1831e96&width=300&dpr=4&quality=100&sign=2218e05e&sv=1)
Checks whether the specified path starts with the Name of this file system provider.
Parameter | Type | Description |
---|---|---|
path | Path of the file to check. |
Returns: Boolean. True if the specified path starts with the name of this file system provider.
CreateDirectory(path)
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%252Finstance.png%3Falt%3Dmedia%26token%3D060b281d-9363-48a1-a0f9-788ad1831e96&width=300&dpr=4&quality=100&sign=2218e05e&sv=1)
Creates the specified directory and sub-directories.
Parameter | Type | Description |
---|---|---|
path | Path of the directory to create. |
DeleteDirectory(path, recursive)
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%252Finstance.png%3Falt%3Dmedia%26token%3D060b281d-9363-48a1-a0f9-788ad1831e96&width=300&dpr=4&quality=100&sign=2218e05e&sv=1)
Deletes the specified directory and, optionally, sub-directories.
Parameter | Type | Description |
---|---|---|
path | Path of the directory to delete. | |
recursive | Indicates whether to delete sub directories. |
DeleteFile(path)
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%252Finstance.png%3Falt%3Dmedia%26token%3D060b281d-9363-48a1-a0f9-788ad1831e96&width=300&dpr=4&quality=100&sign=2218e05e&sv=1)
Deletes the specified file.
Parameter | Type | Description |
---|---|---|
path | Path of the file to delete. |
Exists(path)
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%252Finstance.png%3Falt%3Dmedia%26token%3D060b281d-9363-48a1-a0f9-788ad1831e96&width=300&dpr=4&quality=100&sign=2218e05e&sv=1)
Returns whether the specified file or directory exists.
Parameter | Type | Description |
---|---|---|
path | Path of the file or directory to check. |
Returns: Boolean. True of the file or directory exists.
GetAttributes(path)
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%252Finstance.png%3Falt%3Dmedia%26token%3D060b281d-9363-48a1-a0f9-788ad1831e96&width=300&dpr=4&quality=100&sign=2218e05e&sv=1)
Returns the FileAttributes for the specified path .
Parameter | Type | Description |
---|---|---|
path | File path for which to retrieve the FileAttributes. |
Returns: FileAttributes. An instance of FileAttributes with the relevant flags set.
GetCreationTime(path)
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%252Finstance.png%3Falt%3Dmedia%26token%3D060b281d-9363-48a1-a0f9-788ad1831e96&width=300&dpr=4&quality=100&sign=2218e05e&sv=1)
Returns the file's creation time.
Parameter | Type | Description |
---|---|---|
path | Path of the file to query. |
Returns: DateTime. A DateTime representing the timestamp of the file creation.
GetDirectories(path, pattern, searchOption)
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%252Finstance.png%3Falt%3Dmedia%26token%3D060b281d-9363-48a1-a0f9-788ad1831e96&width=300&dpr=4&quality=100&sign=2218e05e&sv=1)
Returns a list of directory paths that match the pattern and search options in the specified path.
Parameter | Type | Description |
---|---|---|
path | Path to search into. | |
pattern | Wild card pattern to match. | |
searchOption | One of the SearchOption options. |
Returns: String[]. A Array containing the full path of the directories that match the search pattern and search options.
GetFiles(path, pattern, searchOption)
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%252Finstance.png%3Falt%3Dmedia%26token%3D060b281d-9363-48a1-a0f9-788ad1831e96&width=300&dpr=4&quality=100&sign=2218e05e&sv=1)
Returns a list of file paths that match the pattern and search options in the specified path.
Parameter | Type | Description |
---|---|---|
path | Path to search into. | |
pattern | Wild card pattern to match. | |
searchOption | One of the SearchOption options. |
Returns: String[]. A Array containing the full path of the files that match the search pattern and search options.
GetFileSize(path)
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%252Finstance.png%3Falt%3Dmedia%26token%3D060b281d-9363-48a1-a0f9-788ad1831e96&width=300&dpr=4&quality=100&sign=2218e05e&sv=1)
Returns the size of the file.
Parameter | Type | Description |
---|---|---|
path | Path of the file to query. |
Returns: Int64. The size of the file in bytes.
GetLastWriteTime(path)
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%252Finstance.png%3Falt%3Dmedia%26token%3D060b281d-9363-48a1-a0f9-788ad1831e96&width=300&dpr=4&quality=100&sign=2218e05e&sv=1)
Returns the last write timestamp for the specified file.
Parameter | Type | Description |
---|---|---|
path | Path of the file to query. |
Returns: DateTime. A DateTime representing the timestamp of the last time the file was written.
MapPath(path)
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%252Finstance.png%3Falt%3Dmedia%26token%3D060b281d-9363-48a1-a0f9-788ad1831e96&width=300&dpr=4&quality=100&sign=2218e05e&sv=1)
Maps the virtual path to the corresponding physical path on the specific IFileSystemProvider implementation.
Parameter | Type | Description |
---|---|---|
path | Virtual path to map to the corresponding physical path. |
Returns: String. The physical path for the IFileSystemProvider implementation.
OpenFileStream(path, mode, access)
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%252Finstance.png%3Falt%3Dmedia%26token%3D060b281d-9363-48a1-a0f9-788ad1831e96&width=300&dpr=4&quality=100&sign=2218e05e&sv=1)
Opens the specified file for reading or writing.
Parameter | Type | Description |
---|---|---|
path | The path of the file to open. | |
mode | Specified if the file should be opened, created, overwritten or truncated. | |
access | Specified if the stream should be opened for reading or writing. |
Returns: Stream. A Stream that can be used to read or write the content of the file.
RenameDirectory(path, newName)
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%252Finstance.png%3Falt%3Dmedia%26token%3D060b281d-9363-48a1-a0f9-788ad1831e96&width=300&dpr=4&quality=100&sign=2218e05e&sv=1)
Renames the specified directory.
Parameter | Type | Description |
---|---|---|
path | Path of the directory to rename. | |
newName | The new directory name. |
RenameFile(path, newName)
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%252Finstance.png%3Falt%3Dmedia%26token%3D060b281d-9363-48a1-a0f9-788ad1831e96&width=300&dpr=4&quality=100&sign=2218e05e&sv=1)
Renames the specified file.
Implemented By
Name | Description |
---|---|
Default implementation of IFileSystemProvider. Provides access to the server's file system. |
Last updated