ProjectArcade

Форк
0
32 строки · 1.7 Кб
1
using System;
2
using System.IO;
3
using System.Runtime.InteropServices;
4
using DokanNet.Native;
5

6
namespace DokanNet
7
{
8
    public static class Extensions
9
    {
10
        /// <summary>
11
        /// Check if the FileSystem is still running or not.
12
        /// </summary>
13
        /// <param name="dokanInstance">The dokan mount context created by <see cref="CreateFileSystem"/>.</param>
14
        /// <returns>Whether the FileSystem is still running or not.</returns>
15
        public static Boolean IsFileSystemRunning(this DokanInstance dokanInstance)
16
        {
17
            return NativeMethods.DokanIsFileSystemRunning(dokanInstance.DokanHandle);
18
        }
19

20
        /// <summary>
21
        /// Wait until the FileSystem is unmount.
22
        /// </summary>
23
        /// <param name="dokanInstance">The dokan mount context created by <see cref="CreateFileSystem"/>.</param>
24
        /// <param name="milliSeconds">The time-out interval, in milliseconds. If a nonzero value is specified, the function waits until the object is signaled or the interval elapses. If <param name="milliSeconds"> is zero,
25
        /// the function does not enter a wait state if the object is not signaled; it always returns immediately. If <param name="milliSeconds"> is INFINITE, the function will return only when the object is signaled.</param>
26
        /// <returns>See <a href="https://docs.microsoft.com/en-us/windows/win32/api/synchapi/nf-synchapi-waitforsingleobject">WaitForSingleObject</a> for a description of return values.</returns>
27
        public static UInt32 WaitForFileSystemClosed(this DokanInstance dokanInstance, UInt32 milliSeconds)
28
        {
29
            return NativeMethods.DokanWaitForFileSystemClosed(dokanInstance.DokanHandle, milliSeconds);
30
        }
31
    }
32
}
33

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

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

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

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