ProjectArcade

Форк
0
56 строк · 2.8 Кб
1
using System.Runtime.InteropServices;
2

3
namespace DokanNet.Native
4
{
5
    /// <summary>
6
    /// Dokan API callbacks interface
7
    /// 
8
    /// A struct of callbacks that describe all Dokan API operation
9
    /// that will be called when Windows access to the filesystem.
10
    /// 
11
    /// If an error occurs, return <see cref="NtStatus"/>.
12
    /// 
13
    /// All this callbacks can be set to <c>null</c> or return <see cref="NtStatus.NotImplemented"/>
14
    /// if you dont want to support one of them. Be aware that returning such value to important callbacks
15
    /// such <see cref="ZwCreateFile"/>/<see cref="ReadFile"/>/... would make the filesystem not working or unstable.
16
    /// 
17
    /// Se <see cref="IDokanOperations"/> for more information about the fields.
18
    /// </summary>
19
    /// <remarks>This is the same struct as <c>_DOKAN_OPERATIONS</c> (dokan.h) in the C version of Dokan.</remarks>
20
    [StructLayout(LayoutKind.Sequential, Pack = 4)]
21
    internal sealed class DOKAN_OPERATIONS
22
    {
23
        public DokanOperationProxy.ZwCreateFileDelegate ZwCreateFile;
24
        public DokanOperationProxy.CleanupDelegate Cleanup;
25
        public DokanOperationProxy.CloseFileDelegate CloseFile;
26
        public DokanOperationProxy.ReadFileDelegate ReadFile;
27
        public DokanOperationProxy.WriteFileDelegate WriteFile;
28
        public DokanOperationProxy.FlushFileBuffersDelegate FlushFileBuffers;
29
        public DokanOperationProxy.GetFileInformationDelegate GetFileInformation;
30
        public DokanOperationProxy.FindFilesDelegate FindFiles;
31

32
        public DokanOperationProxy.FindFilesWithPatternDelegate FindFilesWithPattern;
33

34
        public DokanOperationProxy.SetFileAttributesDelegate SetFileAttributes;
35
        public DokanOperationProxy.SetFileTimeDelegate SetFileTime;
36
        public DokanOperationProxy.DeleteFileDelegate DeleteFile;
37
        public DokanOperationProxy.DeleteDirectoryDelegate DeleteDirectory;
38
        public DokanOperationProxy.MoveFileDelegate MoveFile;
39
        public DokanOperationProxy.SetEndOfFileDelegate SetEndOfFile;
40
        public DokanOperationProxy.SetAllocationSizeDelegate SetAllocationSize;
41

42
        // Lockfile & Unlockfile are only used if dokan option UserModeLock is enabled
43
        public DokanOperationProxy.LockFileDelegate LockFile;
44
        public DokanOperationProxy.UnlockFileDelegate UnlockFile;
45

46
        public DokanOperationProxy.GetDiskFreeSpaceDelegate GetDiskFreeSpace;
47
        public DokanOperationProxy.GetVolumeInformationDelegate GetVolumeInformation;
48
        public DokanOperationProxy.MountedDelegate Mounted;
49
        public DokanOperationProxy.UnmountedDelegate Unmounted;
50

51
        public DokanOperationProxy.GetFileSecurityDelegate GetFileSecurity;
52
        public DokanOperationProxy.SetFileSecurityDelegate SetFileSecurity;
53

54
        public DokanOperationProxy.FindStreamsDelegate FindStreams;
55
    }
56
}

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.