how to rename directory which is create by FileSystem.makeDirectoryAsync()

I create new folder using FileSystem.makeDirectoryAsync().

await FileSystem.makeDirectoryAsync(FileSystem.documentDirectory + "path/" + folderName, {
    intermediates: true
})

But after I need to rename the created directory and I can’t know how I can do this.
Please advance me if anyone know this issues.
Thanks for your advance.

same as you would in your terminal, using move :slight_smile:

https://docs.expo.io/versions/latest/sdk/filesystem/#filesystemmoveasyncoptions


FileSystem.moveAsync(options)

Move a file or directory to a new location.


so you can move a directory form its old name to its new name

1 Like

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.