Function brane_shr::fs::move_path_async
source · pub async fn move_path_async(
source: impl AsRef<Path>,
target: impl AsRef<Path>,
) -> Result<(), Error>
Expand description
Moves the given or directory from one location to another.
If possible, it will attempt to use the efficient rename()
; otherwise, it will perform te extensive copy.
§Arguments
source
: The current, existing file or directory to copy.target
: The target, non-existing location where the directory will be copied to.
§Errors
This function errors if we failed to read or write anything or if some directories do or do not exist.