예제 #1
0
        internal static NSFileSystemAttributes FromDict(NSDictionary dict)
        {
            if (dict == null)
            {
                return(null);
            }
            var   ret = new NSFileSystemAttributes(dict);
            ulong l   = 0;
            uint  i   = 0;

            ret.Size      = NSFileAttributes.fetch(dict, NSFileManager.SystemSize, ref l) ? l : 0;
            ret.FreeSize  = NSFileAttributes.fetch(dict, NSFileManager.SystemFreeSize, ref l) ? l : 0;
            ret.Nodes     = NSFileAttributes.fetch(dict, NSFileManager.SystemNodes, ref l) ? (long)l : 0;
            ret.FreeNodes = NSFileAttributes.fetch(dict, NSFileManager.SystemFreeNodes, ref l) ? (long)l : 0;
            ret.Number    = NSFileAttributes.fetch(dict, NSFileManager.SystemFreeNodes, ref i) ? i : 0;

            return(ret);
        }
예제 #2
0
        internal static NSFileSystemAttributes FromDict(NSDictionary dict)
        {
            if (dict == null)
                return null;
            var ret = new NSFileSystemAttributes (dict);
            ulong l = 0;
            uint i = 0;
            ret.Size     = NSFileAttributes.fetch (dict, NSFileManager.SystemSize, ref l) ? l : 0;
            ret.FreeSize = NSFileAttributes.fetch (dict, NSFileManager.SystemFreeSize, ref l) ? l : 0;
            ret.Nodes    = NSFileAttributes.fetch (dict, NSFileManager.SystemNodes, ref l) ? (long) l : 0;
            ret.FreeNodes= NSFileAttributes.fetch (dict, NSFileManager.SystemFreeNodes, ref l) ? (long) l : 0;
            ret.Number   = NSFileAttributes.fetch (dict, NSFileManager.SystemFreeNodes, ref i) ? i : 0;

            return ret;
        }
예제 #3
0
 public NSFileSystemAttributes TryGetFileSystemAttributes(string path, out NSError error)
 {
     return(NSFileSystemAttributes.FromDict(_GetFileSystemAttributes(path, out error)));
 }