NSFileManager.SetAttributes 方法

定义

重载

SetAttributes(NSFileAttributes, String)
SetAttributes(NSDictionary, String, NSError)

尝试在指定路径处设置文件的属性,返回成功或失败并设置 error 参数。

SetAttributes(NSFileAttributes, String, NSError)

SetAttributes(NSFileAttributes, String)

public bool SetAttributes (Foundation.NSFileAttributes attributes, string path);
member this.SetAttributes : Foundation.NSFileAttributes * string -> bool

参数

attributes
NSFileAttributes
path
String

返回

适用于

SetAttributes(NSDictionary, String, NSError)

尝试在指定路径处设置文件的属性,返回成功或失败并设置 error 参数。

[Foundation.Export("setAttributes:ofItemAtPath:error:")]
public virtual bool SetAttributes (Foundation.NSDictionary attributes, string path, out Foundation.NSError error);
abstract member SetAttributes : Foundation.NSDictionary * string *  -> bool
override this.SetAttributes : Foundation.NSDictionary * string *  -> bool

参数

attributes
NSDictionary
path
String
error
NSError

返回

属性

适用于

SetAttributes(NSFileAttributes, String, NSError)

public bool SetAttributes (Foundation.NSFileAttributes attributes, string path, out Foundation.NSError error);
member this.SetAttributes : Foundation.NSFileAttributes * string *  -> bool

参数

attributes
NSFileAttributes
path
String
error
NSError

返回

适用于