Skip to content

miniriley2012/swap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Swap

A small utility to swap the names of two files.

Usage

swap [-v] file1 file2

Known Issues

On systems that support RENAME_EXCHANGE (or RENAME_SWAP on macOS) swap will issue a system call that should make the operation atomic. If this is not the case, swap will rename the first file to a temporary name while swapping. If there is a failure for some reason while the first file still has the temporary name, swap will not attempt to undo the operation. I intend for all methods of swapping to be an atomic operation in the future.

About

A small utility to swap the names of two files.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published