Dokan Notify

Dokan User FS file-change notification. More...

Functions

BOOL DokanNotifyCreate (_In_ DOKAN_HANDLE DokanInstance, _In_ LPCWSTR FilePath, _In_ BOOL IsDirectory)
 Notify dokan that a file or a directory has been created. More...
 
BOOL DokanNotifyDelete (_In_ DOKAN_HANDLE DokanInstance, _In_ LPCWSTR FilePath, _In_ BOOL IsDirectory)
 Notify dokan that a file or a directory has been deleted. More...
 
BOOL DokanNotifyUpdate (_In_ DOKAN_HANDLE DokanInstance, _In_ LPCWSTR FilePath)
 Notify dokan that file or directory attributes have changed. More...
 
BOOL DokanNotifyXAttrUpdate (_In_ DOKAN_HANDLE DokanInstance, _In_ LPCWSTR FilePath)
 Notify dokan that file or directory extended attributes have changed. More...
 
BOOL DokanNotifyRename (_In_ DOKAN_HANDLE DokanInstance, _In_ LPCWSTR OldPath, _In_ LPCWSTR NewPath, _In_ BOOL IsDirectory, _In_ BOOL IsInSameDirectory)
 Notify dokan that a file or a directory has been renamed. This method supports in-place rename for file/directory within the same parent. More...
 

Detailed Description

Dokan User FS file-change notification.

The application implementing the user file system can notify the Dokan kernel driver of external file- and directory-changes.

For example, the mirror application can notify the driver about changes made in the mirrored directory so that those changes will be automatically reflected in the implemented mirror file system.

This requires the FilePath passed to the respective DokanNotify*-functions to include the absolute path of the changed file including the drive-letter and the path to the mount point, e.g. "C:\Dokan\ChangedFile.txt".

These functions SHOULD NOT be called from within the implemented file system and thus be independent of any Dokan file system operation.

Function Documentation

BOOL DokanNotifyCreate ( _In_ DOKAN_HANDLE  DokanInstance,
_In_ LPCWSTR  FilePath,
_In_ BOOL  IsDirectory 
)

Notify dokan that a file or a directory has been created.

Parameters
DokanInstanceThe dokan mount context created by DokanCreateFileSystem .
FilePathAbsolute path to the file or directory, including the mount-point of the file system.
IsDirectoryIndicates if the path is a directory.
Returns
TRUE if notification succeeded.
BOOL DokanNotifyDelete ( _In_ DOKAN_HANDLE  DokanInstance,
_In_ LPCWSTR  FilePath,
_In_ BOOL  IsDirectory 
)

Notify dokan that a file or a directory has been deleted.

Parameters
DokanInstanceThe dokan mount context created by DokanCreateFileSystem .
FilePathAbsolute path to the file or directory, including the mount-point of the file system.
IsDirectoryIndicates if the path was a directory.
Returns
TRUE if notification succeeded.
BOOL DokanNotifyRename ( _In_ DOKAN_HANDLE  DokanInstance,
_In_ LPCWSTR  OldPath,
_In_ LPCWSTR  NewPath,
_In_ BOOL  IsDirectory,
_In_ BOOL  IsInSameDirectory 
)

Notify dokan that a file or a directory has been renamed. This method supports in-place rename for file/directory within the same parent.

Parameters
DokanInstanceThe dokan mount context created by DokanCreateFileSystem .
OldPathOld, absolute path to the file or directory, including the mount-point of the file system.
NewPathNew, absolute path to the file or directory, including the mount-point of the file system.
IsDirectoryIndicates if the path is a directory.
IsInSameDirectoryIndicates if the file or directory have the same parent directory.
Returns
TRUE if notification succeeded.
BOOL DokanNotifyUpdate ( _In_ DOKAN_HANDLE  DokanInstance,
_In_ LPCWSTR  FilePath 
)

Notify dokan that file or directory attributes have changed.

Parameters
DokanInstanceThe dokan mount context created by DokanCreateFileSystem .
FilePathAbsolute path to the file or directory, including the mount-point of the file system.
Returns
TRUE if notification succeeded.
BOOL DokanNotifyXAttrUpdate ( _In_ DOKAN_HANDLE  DokanInstance,
_In_ LPCWSTR  FilePath 
)

Notify dokan that file or directory extended attributes have changed.

Parameters
DokanInstanceThe dokan mount context created by DokanCreateFileSystem .
FilePathAbsolute path to the file or directory, including the mount-point of the file system.
Returns
TRUE if notification succeeded.