Files.CreateTempFile Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
CreateTempFile(String, String, IFileAttribute[]) |
Creates an empty file in the default temporary-file directory, using the given prefix and suffix to generate its name. |
CreateTempFile(IPath, String, String, IFileAttribute[]) |
Creates an empty file in the default temporary-file directory, using the given prefix and suffix to generate its name. |
CreateTempFile(String, String, IFileAttribute[])
Creates an empty file in the default temporary-file directory, using the given prefix and suffix to generate its name.
[Android.Runtime.Register("createTempFile", "(Ljava/lang/String;Ljava/lang/String;[Ljava/nio/file/attribute/FileAttribute;)Ljava/nio/file/Path;", "", ApiSince=26)]
public static Java.Nio.FileNio.IPath? CreateTempFile (string? prefix, string? suffix, params Java.Nio.FileNio.Attributes.IFileAttribute[]? attrs);
[<Android.Runtime.Register("createTempFile", "(Ljava/lang/String;Ljava/lang/String;[Ljava/nio/file/attribute/FileAttribute;)Ljava/nio/file/Path;", "", ApiSince=26)>]
static member CreateTempFile : string * string * Java.Nio.FileNio.Attributes.IFileAttribute[] -> Java.Nio.FileNio.IPath
Parameters
- prefix
- String
the prefix string to be used in generating the file's name;
may be null
- suffix
- String
the suffix string to be used in generating the file's name;
may be null
, in which case ".tmp
" is used
- attrs
- IFileAttribute[]
an optional list of file attributes to set atomically when creating the file
Returns
the path to the newly created file that did not exist before this method was invoked
- Attributes
Remarks
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
CreateTempFile(IPath, String, String, IFileAttribute[])
Creates an empty file in the default temporary-file directory, using the given prefix and suffix to generate its name.
[Android.Runtime.Register("createTempFile", "(Ljava/nio/file/Path;Ljava/lang/String;Ljava/lang/String;[Ljava/nio/file/attribute/FileAttribute;)Ljava/nio/file/Path;", "", ApiSince=26)]
public static Java.Nio.FileNio.IPath? CreateTempFile (Java.Nio.FileNio.IPath? dir, string? prefix, string? suffix, params Java.Nio.FileNio.Attributes.IFileAttribute[]? attrs);
[<Android.Runtime.Register("createTempFile", "(Ljava/nio/file/Path;Ljava/lang/String;Ljava/lang/String;[Ljava/nio/file/attribute/FileAttribute;)Ljava/nio/file/Path;", "", ApiSince=26)>]
static member CreateTempFile : Java.Nio.FileNio.IPath * string * string * Java.Nio.FileNio.Attributes.IFileAttribute[] -> Java.Nio.FileNio.IPath
Parameters
- dir
- IPath
- prefix
- String
the prefix string to be used in generating the file's name;
may be null
- suffix
- String
the suffix string to be used in generating the file's name;
may be null
, in which case ".tmp
" is used
- attrs
- IFileAttribute[]
an optional list of file attributes to set atomically when creating the file
Returns
the path to the newly created file that did not exist before this method was invoked
- Attributes
Remarks
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.