Skip to content

Is there a way to rename a file except implementing copy and then deleting original file? #193

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

Open
yanshay opened this issue Jun 7, 2025 · 1 comment

Comments

@yanshay
Copy link

yanshay commented Jun 7, 2025

No description provided.

@thejpster
Copy link
Member

Technically, on FAT file systems yes.

To rename a file and leave it in the same directory, just change the file name part of its directory entry (or, if you are changing the LFN to be longer, you may need to move the directory entry to room for more LFN entries).

If you are moving the file to another directory, you can leave the file in place (as identified by its Starting Cluster) and move the directory entry to a new directory.

If you are moving the file to another volume then no, you have to copy and delete.

However, we do not currently expose an API for the above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants