A validator of Access Control List for files and folders. More...
Public Member Functions | |
Task | ThrowIfReadDeniedAsync (IFolder folder, CancellationToken cancellationToken) |
Asynchronously checks read permissions for a folder and throws exception if read operation is not allowed. More... | |
Task | ThrowIfReadDeniedAsync (IFile file, CancellationToken cancellationToken) |
Asynchronously checks read permissions for a file and throws exception if read operation is not allowed. More... | |
Task | ThrowIfWriteDeniedAsync (IFile file, CancellationToken cancellationToken) |
Asynchronously checks write permissions for a file and throws exception if write operation is not allowed. More... | |
A validator of Access Control List for files and folders.
Task ThrowIfReadDeniedAsync | ( | IFile | file, |
CancellationToken | cancellationToken | ||
) |
Asynchronously checks read permissions for a file and throws exception if read operation is not allowed.
Will throw InvalidExtensionException if file contains not allowed extension.
Will throw FileNotFoundException if read is not allowed.
file | A file to check. |
cancellationToken | A cancellation token |
Task ThrowIfReadDeniedAsync | ( | IFolder | folder, |
CancellationToken | cancellationToken | ||
) |
Asynchronously checks read permissions for a folder and throws exception if read operation is not allowed.
Will throw FolderNotFoundException if read is not allowed.
folder | A folder to check. |
cancellationToken | A cancellation token. |
Task ThrowIfWriteDeniedAsync | ( | IFile | file, |
CancellationToken | cancellationToken | ||
) |
Asynchronously checks write permissions for a file and throws exception if write operation is not allowed.
Will throw InvalidExtensionException if file contains not allowed extension.
Will throw InvalidNameException if file is hidden.
file | A file to check. |
cancellationToken | A cancellation token |