17 global::Interop.Kernel32.WIN32_FILE_ATTRIBUTE_DATA data =
default(global::Interop.Kernel32.WIN32_FILE_ATTRIBUTE_DATA);
19 if (
lastError == 0 && data.dwFileAttributes != -1)
21 return (data.dwFileAttributes & 0
x10) != 0;
28 global::Interop.Kernel32.WIN32_FILE_ATTRIBUTE_DATA data =
default(global::Interop.Kernel32.WIN32_FILE_ATTRIBUTE_DATA);
31 return (data.dwFileAttributes & 0
x10) == 0;
42 if (!global::Interop.Kernel32.GetFileAttributesEx(
path, global::Interop.Kernel32.GET_FILEEX_INFO_LEVELS.GetFileExInfoStandard,
ref data))
47 global::Interop.Kernel32.WIN32_FIND_DATA data2 =
default(global::Interop.Kernel32.WIN32_FIND_DATA);
56 data.PopulateFrom(
ref data2);
63 data.dwFileAttributes = -1;
132 global::Interop.Kernel32.SECURITY_ATTRIBUTES
sECURITY_ATTRIBUTES =
default(global::Interop.Kernel32.SECURITY_ATTRIBUTES);
133 sECURITY_ATTRIBUTES.nLength = (uint)
sizeof(global::Interop.Kernel32.SECURITY_ATTRIBUTES);
134 sECURITY_ATTRIBUTES.lpSecurityDescriptor = (
IntPtr)
ptr;
136 while (
list.Count > 0)
156 if (
count == 0 && !flag)
void Add(TKey key, TValue value)
static bool DirectoryExists(string fullPath)
static unsafe void CreateDirectory(string fullPath, byte[] securityDescriptor=null)
static bool FileExists(string fullPath)
static bool DirectoryExists(string path, out int lastError)
static int FillAttributeInfo(string path, ref global::Interop.Kernel32.WIN32_FILE_ATTRIBUTE_DATA data, bool returnErrorOnNotFound)
static bool IsPathUnreachableError(int errorCode)
static bool EndsInDirectorySeparator(string path)
static int GetRootLength(ReadOnlySpan< char > path)
static string TrimEndingDirectorySeparator(string path)
static bool IsDirectorySeparator(char c)
static ? string GetPathRoot(string? path)
static Exception GetExceptionForWin32Error(int errorCode, string path="")
static int GetLastWin32Error()