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

GetAttributes() public méthode

public GetAttributes ( string fullPath ) : FileAttributes
fullPath string
Résultat FileAttributes
        public override FileAttributes GetAttributes(string fullPath)
        {
            Interop.Kernel32.WIN32_FILE_ATTRIBUTE_DATA data = new Interop.Kernel32.WIN32_FILE_ATTRIBUTE_DATA();
            int errorCode = FillAttributeInfo(fullPath, ref data, false, true);
            if (errorCode != 0)
                throw Win32Marshal.GetExceptionForWin32Error(errorCode, fullPath);

            return (FileAttributes)data.fileAttributes;
        }