NSFileManager.GetUrl 方法

定义

查找并选择性地在域中创建指定的公用目录。

[Foundation.Export("URLForDirectory:inDomain:appropriateForURL:create:error:")]
public virtual Foundation.NSUrl GetUrl (Foundation.NSSearchPathDirectory directory, Foundation.NSSearchPathDomain domain, Foundation.NSUrl url, bool shouldCreate, out Foundation.NSError error);
abstract member GetUrl : Foundation.NSSearchPathDirectory * Foundation.NSSearchPathDomain * Foundation.NSUrl * bool *  -> Foundation.NSUrl
override this.GetUrl : Foundation.NSSearchPathDirectory * Foundation.NSSearchPathDomain * Foundation.NSUrl * bool *  -> Foundation.NSUrl

参数

directory
NSSearchPathDirectory

要查找的目录类型 (例如桌面目录、文档目录、回收站目录等) 。

domain
NSSearchPathDomain

域用于指定基本位置 (例如相对于用户主目录、系统目录或网络目录) 。

url
NSUrl

此参数可以为 null

shouldCreate
Boolean
error
NSError

返回

属性

适用于