DokanNet Namespace Reference

Namespaces

Classes

class  BufferPool
 Simple buffer pool for buffers used by IDokanOperations.ReadFile and IDokanOperations.WriteFile to avoid excessive Gen2 garbage collections due to large buffer allocation on the large object heap (LOH).
 
class  Dokan
 Helper methods to Dokan. More...
 
class  DokanException
 The dokan exception. More...
 
class  DokanHandle
 This class wraps a native DOKAN_HANDLE.
 
struct  FileInformation
 Used to provide file information to Dokan during operations by More...
 
class  FormatProviders
 Provide support to format object with null. More...
 
interface  IDokanFileInfo
 Dokan file information interface. More...
 
interface  IDokanOperations
 Dokan API callbacks interface. More...
 
interface  IDokanOperationsUnsafe
 This is a sub-interface of IDokanOperations that can optionally be implemented to get access to the raw, unmanaged buffers for ReadFile() and WriteFile() for performance optimization. Marshalling the unmanaged buffers to and from byte[] arrays for every call of these APIs incurs an extra copy that can be avoided by reading from or writing directly to the unmanaged buffers. More...
 
class  MockDokanFileInfo
 Mockable Dokan file information on the current operation. More...
 

Enumerations

enum  DokanOptions : uint {
  DokanOptions.FixedDrive = 0, DokanOptions.DebugMode = 1, DokanOptions.StderrOutput = 2, DokanOptions.AltStream = 4,
  DokanOptions.WriteProtection = 8, DokanOptions.NetworkDrive = 16, DokanOptions.RemovableDrive = 32, DokanOptions.MountManager = 64,
  DokanOptions.CurrentSession = 128, DokanOptions.UserModeLock = 256, DokanOptions.EnableNotificationAPI = 512, DokanOptions.CaseSensitive = 1024,
  DokanOptions.EnableNetworkUnmount = 2048, DokanOptions.DispatchDriverLogs = 4096
}
 Dokan mount options used to describe dokan device behavior. More...
 
enum  DokanStatus : int {
  DokanStatus.Success = 0, DokanStatus.Error = -1, DokanStatus.DriveLetterError = -2, DokanStatus.DriverInstallError = -3,
  DokanStatus.StartError = -4, DokanStatus.MountError = -5, DokanStatus.MountPointError = -6, DokanStatus.VersionError = -7
}
 Error codes returned by DokanMain. More...
 
enum  FileAccess : long {
  FileAccess.None = 0, FileAccess.ReadData = 1, FileAccess.WriteData = 1L << 1, FileAccess.AppendData = 1L << 2,
  FileAccess.ReadExtendedAttributes = 1L << 3, FileAccess.WriteExtendedAttributes = 1L << 4, FileAccess.Execute = 1L << 5, FileAccess.DeleteChild = 1L << 6,
  FileAccess.ReadAttributes = 1L << 7, FileAccess.WriteAttributes = 1L << 8, FileAccess.Delete = 1L << 16, FileAccess.ReadPermissions = 1L << 17,
  FileAccess.ChangePermissions = 1L << 18, FileAccess.SetOwnership = 1L << 19, FileAccess.Synchronize = 1L << 20, FileAccess.Reserved = AccessSystemSecurity,
  FileAccess.AccessSystemSecurity = 1L << 24, FileAccess.MaximumAllowed = 1L << 25, FileAccess.GenericAll = 1L << 28, FileAccess.GenericExecute = 1L << 29,
  FileAccess.GenericWrite = 1L << 30, FileAccess.GenericRead = 1L << 31
}
 Defines standard, specific, and generic rights. These rights are used in access control entries (ACEs) and are the primary means of specifying the requested or granted access to an object. More...
 

Enumeration Type Documentation

enum DokanNet.DokanOptions : uint
strong

Dokan mount options used to describe dokan device behavior.

Enumerator
FixedDrive 

Fixed Drive.

DebugMode 

Enable output debug message.

StderrOutput 

Enable output debug message to stderr.

AltStream 

Use alternate stream.

WriteProtection 

Enable mount drive as write-protected.

NetworkDrive 

Use network drive - Dokan network provider need to be installed.

RemovableDrive 

Use removable drive.

MountManager 

Use mount manager.

CurrentSession 

Mount the drive on current session only.

UserModeLock 

Enable Lockfile/Unlockfile operations.

EnableNotificationAPI 

Enable methods in Dokan.Notify, which require this library to maintain a special handle while the file system is mounted. Without this flag, the methods in that inner class always return false if invoked.

CaseSensitive 

Enable Case sensitive path. By default all path are case insensitive. For case sensitive: \dir\File and \diR\file are different files but for case insensitive they are the same.

EnableNetworkUnmount 

Enables unmounting of network drives via file explorer

DispatchDriverLogs 

Forward the kernel driver global and volume logs to the userland

enum DokanNet.DokanStatus : int
strong

Error codes returned by DokanMain.

Enumerator
Success 

Dokan mount succeed.

Error 

Dokan mount error.

DriveLetterError 

Dokan mount failed - Bad drive letter.

DriverInstallError 

Dokan mount failed - Can't install driver.

StartError 

Dokan mount failed - Driver answer that something is wrong.

MountError 

Dokan mount failed. Can't assign a drive letter or mount point. Probably already used by another volume.

MountPointError 

Dokan mount failed. Mount point is invalid.

VersionError 

Dokan mount failed. Requested an incompatible version.

enum DokanNet.FileAccess : long
strong

Defines standard, specific, and generic rights. These rights are used in access control entries (ACEs) and are the primary means of specifying the requested or granted access to an object.

This extends the System.IO.FileAccess enumerator in .NET that only contains flags for Read (0x01) and Write (0x10).

See also
Access Mask Format (MSDN)
ACCESS_MASK (MSDN)
FileAccess Enumeration (MSDN)
Enumerator
None 

No access defined.

ReadData 

Read access right to an object.

Native information
FILE_READ_DATA 0x00000001 File & pipe
FILE_LIST_DIRECTORY 0x00000001 Directory
WriteData 

Write access right to an object.

Native information
FILE_WRITE_DATA 0x00000002 File & pipe
FILE_ADD_FILE 0x00000002 Directory
AppendData 

For a file object, the right to append data to the file.

Native information
FILE_APPEND_DATA 0x00000004 File
FILE_ADD_SUBDIRECTORY 0x00000004 Directory
FILE_CREATE_PIPE_INSTANCE 0x00000004 Named pipe
ReadExtendedAttributes 

The right to read extended file attributes.

Native information
FILE_READ_EA 0x00000008 File & directory
WriteExtendedAttributes 

The right to write extended file attributes.

Native information
FILE_WRITE_EA 0x00000010 File & directory
Execute 

For a native code file, the right to execute the file. This access right given to scripts may cause the script to be executable, depending on the script interpreter.

Native information
FILE_EXECUTE 0x00000020 File
FILE_TRAVERSE 0x00000020 Directory
DeleteChild 

For a directory, the right to delete a directory and all the files it contains, including read-only files.

Native information
FILE_DELETE_CHILD 0x00000040 Directory
ReadAttributes 

The right to read file attributes.

Native information
FILE_READ_ATTRIBUTES 0x00000080 All
WriteAttributes 

The right to write file attributes.

Native information
FILE_WRITE_ATTRIBUTES 0x00000100 All
Delete 

The right to delete the object.

Native information
DELETE 0x00010000  
ReadPermissions 

The right to read the information in the object's security descriptor, not including the information in the system access control list (SACL).

Native information
READ_CONTROL 0x00020000  
ChangePermissions 

The right to modify the discretionary access control list (DACL) in the object's security descriptor.

Native information
WRITE_DAC 0x00040000  
SetOwnership 

The right to change the owner in the object's security descriptor.

Native information
WRITE_OWNER 0x00080000  
Synchronize 

The right to use the object for synchronization. This enables a thread to wait until the object is in the signaled state. Some object types do not support this access right.

Native information
SYNCHRONIZE 0x00100000  
Reserved 

Obsolete, use FileAccess.AccessSystemSecurity instead.

AccessSystemSecurity 

Access system security. It is used to indicate access to a system access control list (SACL). This type of access requires the calling process to have the SE_SECURITY_NAME (Manage auditing and security log) privilege. If this flag is set in the access mask of an audit access ACE (successful or unsuccessful access), the SACL access will be audited.

Native information
ACCESS_SYSTEM_SECURITY 0x01000000  
MaximumAllowed 

All the access rights that are valid for the caller.

Native information
MAXIMUM_ALLOWED 0x02000000  
GenericAll 

All possible access rights.

Native information
GENERIC_ALL 0x10000000  
GenericExecute 

Generic execute access.

Native information
GENERIC_EXECUTE 0x20000000  
GenericWrite 

Generic write access.

Native information
GENERIC_WRITE 0x40000000  
GenericRead 

Generic read access.

Native information
GENERIC_READ 0x80000000