UseMoveFile
katanakit-js / useMoveFile
Function: useMoveFile()
Section titled “Function: useMoveFile()”function useMoveFile(source, destination): Promise<FilesystemResult<string>>;Defined in: infrastructure/filesystem/filesystem.service.ts:456
Moves (renames) a file or directory.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
source |
string |
Source path. |
destination |
string |
Destination path. |
Returns
Section titled “Returns”Promise<FilesystemResult<string>>
Safe Result with the destination path.
Example
Section titled “Example”await useMoveFile("data/draft.json", "data/books.json");