System.IO.Win32FileSystem.DirectoryExists C# (CSharp) Méthode

DirectoryExists() private méthode

private DirectoryExists ( String path, int &lastError ) : bool
path String
lastError int
Résultat bool
        private bool DirectoryExists(String path, out int lastError)
        {
            Interop.Kernel32.WIN32_FILE_ATTRIBUTE_DATA data = new Interop.Kernel32.WIN32_FILE_ATTRIBUTE_DATA();
            lastError = FillAttributeInfo(path, ref data, false, true);

            return (lastError == 0) && (data.fileAttributes != -1)
                    && ((data.fileAttributes & Interop.Kernel32.FileAttributes.FILE_ATTRIBUTE_DIRECTORY) != 0);
        }

Same methods

Win32FileSystem::DirectoryExists ( string fullPath ) : bool