~ubuntu-branches/ubuntu/trusty/monodevelop/trusty-proposed

« back to all changes in this revision

Viewing changes to external/maccore/src/Foundation/NSFileManager.cs

  • Committer: Package Import Robot
  • Author(s): Jo Shields
  • Date: 2013-05-12 09:46:03 UTC
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20130512094603-mad323bzcxvmcam0
Tags: upstream-4.0.5+dfsg
ImportĀ upstreamĀ versionĀ 4.0.5+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
//   Miguel de Icaza
5
5
//
6
6
// Copyright 2011, Novell, Inc.
 
7
// Copyright 2011, 2012 Xamarin Inc
7
8
//
8
9
// Permission is hereby granted, free of charge, to any person obtaining
9
10
// a copy of this software and associated documentation files (the
231
232
        public partial class NSFileManager {
232
233
                public bool SetAttributes (NSFileAttributes attributes, string path, out NSError error)
233
234
                {
 
235
                        if (attributes == null)
 
236
                                throw new ArgumentNullException ("attributes");
234
237
                        return SetAttributes (attributes.ToDictionary (), path, out error);
235
238
                }
236
239
 
237
240
                public bool SetAttributes (NSFileAttributes attributes, string path)
238
241
                {
239
242
                        NSError ignore;
240
 
                        
 
243
                        if (attributes == null)
 
244
                                throw new ArgumentNullException ("attributes");
 
245
 
241
246
                        return SetAttributes (attributes.ToDictionary (), path, out ignore);
242
247
                }
243
248
 
244
249
                public bool CreateDirectory (string path, bool createIntermediates, NSFileAttributes attributes, out NSError error)
245
250
                {
246
 
                        return CreateDirectory (path, createIntermediates, attributes.ToDictionary (), out error);
 
251
                        var dict = attributes == null ? null : attributes.ToDictionary ();
 
252
                        return CreateDirectory (path, createIntermediates, dict, out error);
247
253
                }
248
254
 
249
255
                public bool CreateDirectory (string path, bool createIntermediates, NSFileAttributes attributes)
250
256
                {
251
257
                        NSError error;
252
 
                        return CreateDirectory (path, createIntermediates, attributes.ToDictionary (), out error);
 
258
                        var dict = attributes == null ? null : attributes.ToDictionary ();
 
259
                        return CreateDirectory (path, createIntermediates, dict, out error);
253
260
                }
254
261
 
255
262
                public bool CreateFile (string path, NSData data, NSFileAttributes attributes)
256
263
                {
257
 
                        return CreateFile (path, data, attributes.ToDictionary ());
 
264
                        var dict = attributes == null ? null : attributes.ToDictionary ();
 
265
                        return CreateFile (path, data, dict);
258
266
                }
259
267
                
260
268
                public NSFileAttributes GetAttributes (string path, out NSError error)
278
286
                {
279
287
                        return NSFileSystemAttributes.FromDict (_GetFileSystemAttributes (path, out error));
280
288
                }
 
289
 
 
290
                public string CurrentDirectory {
 
291
                        get { return GetCurrentDirectory (); }
 
292
                        // ignore boolean return value
 
293
                        set { ChangeCurrentDirectory (value); }
 
294
                }
281
295
        }
282
296
}
 
 
b'\\ No newline at end of file'