EngineWindowsFilterAsync Method |
IT Hit User File System
Allows filtering file system items that should NOT be synched to the remote storage.
Namespace:
ITHit.FileSystem.Windows
Assembly:
ITHit.FileSystem.Windows (in ITHit.FileSystem.Windows.dll) Version: 4.4.14419.0
Syntaxpublic override Task<bool> FilterAsync(
OperationType operationType,
string userFileSystemPath,
string userFileSystemPathNew = null,
IOperationContext operationContext = null
)
Public Overrides Function FilterAsync (
operationType As OperationType,
userFileSystemPath As String,
Optional userFileSystemPathNew As String = Nothing,
Optional operationContext As IOperationContext = Nothing
) As Task(Of Boolean)
public:
virtual Task<bool>^ FilterAsync(
OperationType operationType,
String^ userFileSystemPath,
String^ userFileSystemPathNew = nullptr,
IOperationContext^ operationContext = nullptr
) override
abstract FilterAsync :
operationType : OperationType *
userFileSystemPath : string *
?userFileSystemPathNew : string *
?operationContext : IOperationContext
(* Defaults:
let _userFileSystemPathNew = defaultArg userFileSystemPathNew null
let _operationContext = defaultArg operationContext null
*)
-> Task<bool>
override FilterAsync :
operationType : OperationType *
userFileSystemPath : string *
?userFileSystemPathNew : string *
?operationContext : IOperationContext
(* Defaults:
let _userFileSystemPathNew = defaultArg userFileSystemPathNew null
let _operationContext = defaultArg operationContext null
*)
-> Task<bool>
Parameters
- operationType
- Type: ITHit.FileSystemOperationType
File system operation type: OperationType. - userFileSystemPath
- Type: SystemString
File system item path. In case of move and rename operation this is the source path. - userFileSystemPathNew (Optional)
- Type: SystemString
[Missing <param name="userFileSystemPathNew"/> documentation for "M:ITHit.FileSystem.Windows.EngineWindows.FilterAsync(ITHit.FileSystem.OperationType,System.String,System.String,ITHit.FileSystem.IOperationContext)"]
- operationContext (Optional)
- Type: ITHit.FileSystemIOperationContext
Provides information about the environment.
Return Value
Type:
TaskBooleanTrue if the item must NOT be synched to the remote storage. False otherwise.
Implements
IEngineFilterAsync(OperationType, String, String, IOperationContext)
Remarks
This method is called before calling GetFileSystemItemAsync(String, FileSystemItemType, Byte) as well as each IFile,
IFolder and [!:ILock] interface methods.
If this method returns true, the method is NOT called.
You can use this method to exclude items from synchronization with the remote storage.
For example you can exclude temporary files, system files, Microsoft Office lock files, backup files, etc.
The default Engine implementation returns false for all items.
See Also