ProjectArcade
74 строки · 2.6 Кб
1using System.Security.Principal;2
3namespace DokanNet4{
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>11public interface IDokanFileInfo12{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>18object Context { get; set; }19
20/// <summary>21/// Gets or sets a value indicating whether the file has to be delete22/// during the <see cref="IDokanOperations.Cleanup"/> event.23/// </summary>24bool DeleteOnClose { get; set; }25
26/// <summary>27/// Gets or sets a value indicating whether it requesting a directory28/// file. Must be set in <see cref="IDokanOperations.CreateFile"/> if29/// the file appear to be a folder.30/// </summary>31bool IsDirectory { get; set; }32
33/// <summary>34/// Read or write directly from data source without cache.35/// </summary>36bool NoCache { get; }37
38/// <summary>39/// Read or write is paging IO.40/// </summary>41bool PagingIo { get; }42
43/// <summary>44/// Process id for the thread that originally requested a given I/O45/// operation.46/// </summary>47int ProcessId { get; }48
49/// <summary>50/// Read or write is synchronous IO.51/// </summary>52bool SynchronousIo { get; }53
54/// <summary>55/// If <c>true</c>, write to the current end of file instead56/// of using the <c>Offset</c> parameter.57/// </summary>58bool 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>65WindowsIdentity 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>72bool TryResetTimeout(int milliseconds);73}74}