6
6
// Copyright 2011, Novell, Inc.
7
// Copyright 2011, 2012 Xamarin Inc
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)
235
if (attributes == null)
236
throw new ArgumentNullException ("attributes");
234
237
return SetAttributes (attributes.ToDictionary (), path, out error);
237
240
public bool SetAttributes (NSFileAttributes attributes, string path)
243
if (attributes == null)
244
throw new ArgumentNullException ("attributes");
241
246
return SetAttributes (attributes.ToDictionary (), path, out ignore);
244
249
public bool CreateDirectory (string path, bool createIntermediates, NSFileAttributes attributes, out NSError error)
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);
249
255
public bool CreateDirectory (string path, bool createIntermediates, NSFileAttributes attributes)
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);
255
262
public bool CreateFile (string path, NSData data, NSFileAttributes attributes)
257
return CreateFile (path, data, attributes.ToDictionary ());
264
var dict = attributes == null ? null : attributes.ToDictionary ();
265
return CreateFile (path, data, dict);
260
268
public NSFileAttributes GetAttributes (string path, out NSError error)
279
287
return NSFileSystemAttributes.FromDict (_GetFileSystemAttributes (path, out error));
290
public string CurrentDirectory {
291
get { return GetCurrentDirectory (); }
292
// ignore boolean return value
293
set { ChangeCurrentDirectory (value); }
b'\\ No newline at end of file'