ProjectArcade

Форк
0
74 строки · 2.6 Кб
1
using System.Security.Principal;
2

3
namespace DokanNet
4
{
5
    /// <summary>
6
    /// %Dokan file information interface.
7
    /// </summary>
8
    /// <remarks>
9
    /// This interface can be inherited in order to testunit user <see cref="IDokanOperations"/> implementation.
10
    /// </remarks>
11
    public interface IDokanFileInfo
12
    {
13
        /// <summary>
14
        /// Gets or sets context that can be used to carry information between operation.
15
        /// The Context can carry whatever type like <c><see cref="System.IO.FileStream"/></c>, <c>struct</c>, <c>int</c>,
16
        /// or internal reference that will help the implementation understand the request context of the event.
17
        /// </summary>
18
        object Context { get; set; }
19

20
        /// <summary>
21
        /// Gets or sets a value indicating whether the file has to be delete
22
        /// during the <see cref="IDokanOperations.Cleanup"/> event.
23
        /// </summary>
24
        bool DeleteOnClose { get; set; }
25

26
        /// <summary>
27
        /// Gets or sets a value indicating whether it requesting a directory
28
        /// file. Must be set in <see cref="IDokanOperations.CreateFile"/> if
29
        /// the file appear to be a folder.
30
        /// </summary>
31
        bool IsDirectory { get; set; }
32

33
        /// <summary>
34
        /// Read or write directly from data source without cache.
35
        /// </summary>
36
        bool NoCache { get; }
37

38
        /// <summary>
39
        /// Read or write is paging IO.
40
        /// </summary>
41
        bool PagingIo { get; }
42

43
        /// <summary>
44
        /// Process id for the thread that originally requested a given I/O
45
        /// operation.
46
        /// </summary>
47
        int ProcessId { get; }
48

49
        /// <summary>
50
        /// Read or write is synchronous IO.
51
        /// </summary>
52
        bool SynchronousIo { get; }
53

54
        /// <summary>
55
        /// If <c>true</c>, write to the current end of file instead 
56
        /// of using the <c>Offset</c> parameter.
57
        /// </summary>
58
        bool WriteToEndOfFile { get; }
59

60
        /// <summary>
61
        /// This method needs to be called in <see cref="IDokanOperations.CreateFile"/>.
62
        /// </summary>
63
        /// <returns>An <c><see cref="WindowsIdentity"/></c> with the access token, 
64
        /// -or- <c>null</c> if the operation was not successful.</returns>
65
        WindowsIdentity GetRequestor();
66

67
        /// <summary>
68
        /// Extends the time out of the current IO operation in driver.
69
        /// </summary>
70
        /// <param name="milliseconds">Number of milliseconds to extend with.</param>
71
        /// <returns>If the operation was successful.</returns>
72
        bool TryResetTimeout(int milliseconds);
73
    }
74
}

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

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

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

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