다음을 통해 공유


ISecureDirectoryStream.Move(Object, ISecureDirectoryStream, Object) Method

Definition

Move a file from this directory to another directory.

[Android.Runtime.Register("move", "(Ljava/lang/Object;Ljava/nio/file/SecureDirectoryStream;Ljava/lang/Object;)V", "GetMove_Ljava_lang_Object_Ljava_nio_file_SecureDirectoryStream_Ljava_lang_Object_Handler:Java.Nio.FileNio.ISecureDirectoryStreamInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)]
public void Move (Java.Lang.Object? srcpath, Java.Nio.FileNio.ISecureDirectoryStream? targetdir, Java.Lang.Object? targetpath);
[<Android.Runtime.Register("move", "(Ljava/lang/Object;Ljava/nio/file/SecureDirectoryStream;Ljava/lang/Object;)V", "GetMove_Ljava_lang_Object_Ljava_nio_file_SecureDirectoryStream_Ljava_lang_Object_Handler:Java.Nio.FileNio.ISecureDirectoryStreamInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)>]
abstract member Move : Java.Lang.Object * Java.Nio.FileNio.ISecureDirectoryStream * Java.Lang.Object -> unit

Parameters

srcpath
Object

the name of the file to move

targetdir
ISecureDirectoryStream

the destination directory

targetpath
Object

the name to give the file in the destination directory

Attributes

Remarks

Move a file from this directory to another directory.

This method works in a similar manner to Files#move move method when the StandardCopyOption#ATOMIC_MOVE ATOMIC_MOVE option is specified. That is, this method moves a file as an atomic file system operation. If the srcpath parameter is an Path#isAbsolute absolute path then it locates the source file. If the parameter is a relative path then it is located relative to this open directory. If the targetpath parameter is absolute then it locates the target file (the targetdir parameter is ignored). If the parameter is a relative path it is located relative to the open directory identified by the targetdir parameter. In all cases, if the target file exists then it is implementation specific if it is replaced or this method fails.

Java documentation for java.nio.file.SecureDirectoryStream.move(T, java.nio.file.SecureDirectoryStream<T>, T).

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