-
Notifications
You must be signed in to change notification settings - Fork 392
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sandbox.filesystem.rename() #386
Comments
Thanks @jamesmurdza! I think having |
That would be great! Much better than what I'm doing now: const moveFile = async (filesystem: FilesystemManager, filePath: string, newFilePath: string) => {
const fileContents = await filesystem.readBytes(filePath)
await filesystem.writeBytes(newFilePath, fileContents);
await filesystem.remove(filePath);
} |
Sounds good — should be quick to add. P.S. I think the workaround right now could be using |
@jamesmurdza Are there any other operations that you had to use a workaround for? |
@ValentaTomas Right, not sure why I'm not doing it that way now. Yes, for the terminal SDK I'm using:
because
However, I didn't create an issue for this because @mlejva mentioned you're already rewriting some of this. |
Right now there is no method to move or rename a file or directory in a sandbox, like
fs.rename
.I would suggest adding one. For example:
rename(oldPath, newPath)
The text was updated successfully, but these errors were encountered: