rename
abstract fun rename(oldUri: Uri, newUri: Uri, options: FileSystemProvider.RenameOptions): PromiseLike<Void>?(source)
Rename a file or folder.
Parameters
oldUri
The existing file.
newUri
The new location.
options
Defines if existing files should be overwritten.
Throws
FileNotFound
FileSystemError.FileNotFound when parent of newUri doesn't exist, e.g. no mkdirp-logic required.
FileExists
FileSystemError.FileExists when newUri exists and when the overwrite option is not true.
NoPermissions
FileSystemError.NoPermissions when permissions aren't sufficient.