Sdílet prostřednictvím


Files.CreateTempDirectory Method

Definition

Overloads

CreateTempDirectory(String, IFileAttribute[])

Creates a new directory in the default temporary-file directory, using the given prefix to generate its name.

CreateTempDirectory(IPath, String, IFileAttribute[])

Creates a new directory in the default temporary-file directory, using the given prefix to generate its name.

CreateTempDirectory(String, IFileAttribute[])

Creates a new directory in the default temporary-file directory, using the given prefix to generate its name.

[Android.Runtime.Register("createTempDirectory", "(Ljava/lang/String;[Ljava/nio/file/attribute/FileAttribute;)Ljava/nio/file/Path;", "", ApiSince=26)]
public static Java.Nio.FileNio.IPath? CreateTempDirectory (string? prefix, params Java.Nio.FileNio.Attributes.IFileAttribute[]? attrs);
[<Android.Runtime.Register("createTempDirectory", "(Ljava/lang/String;[Ljava/nio/file/attribute/FileAttribute;)Ljava/nio/file/Path;", "", ApiSince=26)>]
static member CreateTempDirectory : string * Java.Nio.FileNio.Attributes.IFileAttribute[] -> Java.Nio.FileNio.IPath

Parameters

prefix
String

the prefix string to be used in generating the directory's name; may be null

attrs
IFileAttribute[]

an optional list of file attributes to set atomically when creating the directory

Returns

the path to the newly created directory that did not exist before this method was invoked

Attributes

Remarks

Java documentation for java.nio.file.Files.createTempDirectory(java.lang.String, java.nio.file.attribute.FileAttribute).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

CreateTempDirectory(IPath, String, IFileAttribute[])

Creates a new directory in the default temporary-file directory, using the given prefix to generate its name.

[Android.Runtime.Register("createTempDirectory", "(Ljava/nio/file/Path;Ljava/lang/String;[Ljava/nio/file/attribute/FileAttribute;)Ljava/nio/file/Path;", "", ApiSince=26)]
public static Java.Nio.FileNio.IPath? CreateTempDirectory (Java.Nio.FileNio.IPath? dir, string? prefix, params Java.Nio.FileNio.Attributes.IFileAttribute[]? attrs);
[<Android.Runtime.Register("createTempDirectory", "(Ljava/nio/file/Path;Ljava/lang/String;[Ljava/nio/file/attribute/FileAttribute;)Ljava/nio/file/Path;", "", ApiSince=26)>]
static member CreateTempDirectory : Java.Nio.FileNio.IPath * string * Java.Nio.FileNio.Attributes.IFileAttribute[] -> Java.Nio.FileNio.IPath

Parameters

dir
IPath
prefix
String

the prefix string to be used in generating the directory's name; may be null

attrs
IFileAttribute[]

an optional list of file attributes to set atomically when creating the directory

Returns

the path to the newly created directory that did not exist before this method was invoked

Attributes

Remarks

Java documentation for java.nio.file.Files.createTempDirectory(java.lang.String, java.nio.file.attribute.FileAttribute).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to