CKFinder 3 – ASP.NET Connector Documentation
LocalStorage Class Reference

A local file system. More...

Inheritance diagram for LocalStorage:
IFileSystem

Public Member Functions

 LocalStorage (string root)
 Constructs a new instance of LocalStorage. More...
 
 LocalStorage (string root, string baseUrl)
 Constructs a new instance of LocalStorage. More...
 
async Task CreateFolderAsync (string path, CancellationToken cancellationToken)
 Asynchronously creates new folder. More...
 
async Task DeleteFileAsync (string path, CancellationToken cancellationToken)
 Asynchronously deletes a file. More...
 
async Task DeleteFolderAsync (string path, CancellationToken cancellationToken)
 Asynchronously deletes a folder. More...
 
async Task DeleteFolderAsync (string path, Action< int, int > progressAction, CancellationToken cancellationToken)
 Asynchronously deletes a folder. More...
 
async Task MoveFileAsync (string srcPath, string destPath, CancellationToken cancellationToken)
 Asynchronously moves a file. More...
 
async Task MoveFolderAsync (string srcPath, string destPath, CancellationToken cancellationToken)
 Asynchronously moves a folder. More...
 
async Task MoveFolderAsync (string srcPath, string destPath, Action< int, int > progressAction, CancellationToken cancellationToken)
 Asynchronously moves a folder. More...
 
async Task CopyFileAsync (string srcPath, string destPath, CancellationToken cancellationToken)
 Asynchronously copies a file. More...
 
async Task< bool > FileExistsAsync (string path, CancellationToken cancellationToken)
 Asynchronously checks whether a file exists. More...
 
async Task< bool > FolderExistsAsync (string path, CancellationToken cancellationToken)
 Asynchronously checks whether a folder exists. More...
 
async Task WriteAsync (Stream fileStream, string path, CancellationToken cancellationToken)
 Asynchronously writes file content. More...
 
async Task< Stream > ReadAsync (string path, CancellationToken cancellationToken)
 Asynchronously reads file content. More...
 
async Task< FolderListResultGetFolderInfosAsync (string path, CancellationToken cancellationToken)
 Asynchronously lists folder informations. More...
 
async Task< FolderListResultGetFolderInfosAsync (IFolderListContinuation folderListContinuation, CancellationToken cancellationToken)
 Asynchronously lists folder informations. More...
 
async Task< FileListResultGetFileInfosAsync (string path, CancellationToken cancellationToken)
 Asynchronously lists file informations. More...
 
async Task< FileListResultGetFileInfosAsync (IFileListContinuation fileListContinuation, CancellationToken cancellationToken)
 Asynchronously lists file informations. More...
 
async Task< FolderInfoGetFolderInfoAsync (string path, CancellationToken cancellationToken)
 Asychronously gets folder information. More...
 
async Task< FileInfoGetFileInfoAsync (string path, CancellationToken cancellationToken)
 Asychronously gets file information. More...
 
Task< string > GetUrlAsync (string path, CancellationToken cancellationToken)
 Asynchronously gets resource URL. May return null if URL is not available. More...
 

Detailed Description

A local file system.

Constructor & Destructor Documentation

◆ LocalStorage() [1/2]

LocalStorage ( string  root)
inline

Constructs a new instance of LocalStorage.

Parameters
rootA path to the root of the file system.

◆ LocalStorage() [2/2]

LocalStorage ( string  root,
string  baseUrl 
)
inline

Constructs a new instance of LocalStorage.

Parameters
rootA path to the root of the file system.
baseUrlA base URL for accessing files over the network.

Member Function Documentation

◆ CopyFileAsync()

async Task CopyFileAsync ( string  srcPath,
string  destPath,
CancellationToken  cancellationToken 
)
inline

Asynchronously copies a file.

Parameters
srcPathA path to the file.
destPathA path to the destination file.
cancellationTokenA cancellation token.

Implements IFileSystem.

◆ CreateFolderAsync()

async Task CreateFolderAsync ( string  path,
CancellationToken  cancellationToken 
)
inline

Asynchronously creates new folder.

Parameters
pathA path to the new folder.
cancellationTokenA cancellation token.

Implements IFileSystem.

◆ DeleteFileAsync()

async Task DeleteFileAsync ( string  path,
CancellationToken  cancellationToken 
)
inline

Asynchronously deletes a file.

Parameters
pathA path to the file.
cancellationTokenA cancellation token.

Implements IFileSystem.

◆ DeleteFolderAsync() [1/2]

async Task DeleteFolderAsync ( string  path,
Action< int, int >  progressAction,
CancellationToken  cancellationToken 
)
inline

Asynchronously deletes a folder.

Parameters
pathA path to the folder.
progressActionAn action fired when progress is updated.
cancellationTokenA cancellation token.

Implements IFileSystem.

◆ DeleteFolderAsync() [2/2]

async Task DeleteFolderAsync ( string  path,
CancellationToken  cancellationToken 
)
inline

Asynchronously deletes a folder.

Parameters
pathA path to the folder.
cancellationTokenA cancellation token.

Implements IFileSystem.

◆ FileExistsAsync()

async Task<bool> FileExistsAsync ( string  path,
CancellationToken  cancellationToken 
)
inline

Asynchronously checks whether a file exists.

Parameters
pathA path to the file.
cancellationTokenA cancellation token.
Returns
True if file exists, false otherwise.

Implements IFileSystem.

◆ FolderExistsAsync()

async Task<bool> FolderExistsAsync ( string  path,
CancellationToken  cancellationToken 
)
inline

Asynchronously checks whether a folder exists.

Parameters
pathA path to the folder.
cancellationTokenA cancellation token.
Returns
True if folder exists, false otherwise.

Implements IFileSystem.

◆ GetFileInfoAsync()

async Task<FileInfo> GetFileInfoAsync ( string  path,
CancellationToken  cancellationToken 
)
inline

Asychronously gets file information.

Parameters
pathA path to the file.
cancellationTokenA cancellation token.
Returns
A file information.

Implements IFileSystem.

◆ GetFileInfosAsync() [1/2]

async Task<FileListResult> GetFileInfosAsync ( IFileListContinuation  fileListContinuation,
CancellationToken  cancellationToken 
)
inline

Asynchronously lists file informations.

Parameters
fileListContinuationA file list continuation.
cancellationTokenA cancellation token.
Returns
A file list result.

Implements IFileSystem.

◆ GetFileInfosAsync() [2/2]

async Task<FileListResult> GetFileInfosAsync ( string  path,
CancellationToken  cancellationToken 
)
inline

Asynchronously lists file informations.

Parameters
pathA path to the folder.
cancellationTokenA cancellation token.
Returns
A file list result.

Implements IFileSystem.

◆ GetFolderInfoAsync()

async Task<FolderInfo> GetFolderInfoAsync ( string  path,
CancellationToken  cancellationToken 
)
inline

Asychronously gets folder information.

Parameters
pathA path to the folder.
cancellationTokenA cancellation token.
Returns
A folder information.

Implements IFileSystem.

◆ GetFolderInfosAsync() [1/2]

async Task<FolderListResult> GetFolderInfosAsync ( IFolderListContinuation  folderListContinuation,
CancellationToken  cancellationToken 
)
inline

Asynchronously lists folder informations.

Parameters
folderListContinuationA folder list continuation.
cancellationTokenA cancellation token.
Returns
A folder list result.

Implements IFileSystem.

◆ GetFolderInfosAsync() [2/2]

async Task<FolderListResult> GetFolderInfosAsync ( string  path,
CancellationToken  cancellationToken 
)
inline

Asynchronously lists folder informations.

Parameters
pathA path to the folder.
cancellationTokenA cancellation token.
Returns
A folder list result.

Implements IFileSystem.

◆ GetUrlAsync()

Task<string> GetUrlAsync ( string  path,
CancellationToken  cancellationToken 
)
inline

Asynchronously gets resource URL. May return null if URL is not available.

Parameters
pathA path to the resource.
cancellationTokenA cancellation token.
Returns
An URL to the resource or null if URL is not available.

Implements IFileSystem.

◆ MoveFileAsync()

async Task MoveFileAsync ( string  srcPath,
string  destPath,
CancellationToken  cancellationToken 
)
inline

Asynchronously moves a file.

Parameters
srcPathA path to the file.
destPathA path to the destination file.
cancellationTokenA cancellation token.

Implements IFileSystem.

◆ MoveFolderAsync() [1/2]

async Task MoveFolderAsync ( string  srcPath,
string  destPath,
Action< int, int >  progressAction,
CancellationToken  cancellationToken 
)
inline

Asynchronously moves a folder.

Parameters
srcPathA path to the folder.
destPathA path to the destination folder.
progressActionAn action fired when progress is updated.
cancellationTokenA cancellation token.

Implements IFileSystem.

◆ MoveFolderAsync() [2/2]

async Task MoveFolderAsync ( string  srcPath,
string  destPath,
CancellationToken  cancellationToken 
)
inline

Asynchronously moves a folder.

Parameters
srcPathA path to the folder.
destPathA path to the destination folder.
cancellationTokenA cancellation token.

Implements IFileSystem.

◆ ReadAsync()

async Task<Stream> ReadAsync ( string  path,
CancellationToken  cancellationToken 
)
inline

Asynchronously reads file content.

Parameters
pathA path to the file.
cancellationTokenA cancellation token.
Returns
A stream with file content.

Implements IFileSystem.

◆ WriteAsync()

async Task WriteAsync ( Stream  fileStream,
string  path,
CancellationToken  cancellationToken 
)
inline

Asynchronously writes file content.

Parameters
fileStreamA stream with content to write.
pathA path to the file.
cancellationTokenA cancellation token.

Implements IFileSystem.


The documentation for this class was generated from the following file: