Esempio n. 1
0
        internal static NSFileSystemAttributes FromDictionary(NSDictionary dict)
        {
            if (dict == null)
            {
                return(null);
            }
            var   ret = new NSFileSystemAttributes(dict);
            ulong l   = 0;
            uint  i   = 0;

            ret.Size      = NSFileAttributes.fetch_ulong(dict, NSFileManager.SystemSize) ?? 0;
            ret.FreeSize  = NSFileAttributes.fetch_ulong(dict, NSFileManager.SystemFreeSize) ?? 0;
            ret.Nodes     = NSFileAttributes.fetch_long(dict, NSFileManager.SystemNodes) ?? 0;
            ret.FreeNodes = NSFileAttributes.fetch_long(dict, NSFileManager.SystemFreeNodes) ?? 0;
            ret.Number    = NSFileAttributes.fetch_uint(dict, NSFileManager.SystemFreeNodes) ?? 0;

            return(ret);
        }
Esempio n. 2
0
 public NSFileSystemAttributes GetFileSystemAttributes(string path, out NSError error)
 {
     return(NSFileSystemAttributes.FromDictionary(_GetFileSystemAttributes(path, out error)));
 }
Esempio n. 3
0
        internal static NSFileSystemAttributes FromDictionary(NSDictionary dict)
        {
            if (dict == null)
                return null;
            var ret = new NSFileSystemAttributes (dict);
            ulong l = 0;
            uint i = 0;
            ret.Size      = NSFileAttributes.fetch_ulong (dict, NSFileManager.SystemSize) ?? 0;
            ret.FreeSize  = NSFileAttributes.fetch_ulong (dict, NSFileManager.SystemFreeSize) ?? 0;
            ret.Nodes     = NSFileAttributes.fetch_long (dict, NSFileManager.SystemNodes) ?? 0;
            ret.FreeNodes = NSFileAttributes.fetch_long (dict, NSFileManager.SystemFreeNodes) ?? 0;
            ret.Number    = NSFileAttributes.fetch_uint (dict, NSFileManager.SystemFreeNodes) ?? 0;

            return ret;
        }