Open RaitoBezarius opened 8 months ago
Did you try os.rename()
for move? I'm not sure why we'd re-implement that.
For copy you can already read and write files right?
Also note the FFI only applies to LuaJIT, so even adding an implementation that way may not cover your use case.
If there is some reason to provide a real implementation the more likely candidate would be to add this to LFS, not Penlight.
Did you try
os.rename()
for move? I'm not sure why we'd re-implement that.
This only works on the same filesystem? Not across filesystem, does it?
For copy you can already read and write files right?
Yes, but this is not realistic for large files and small memory size.
Also note the FFI only applies to LuaJIT, so even adding an implementation that way may not cover your use case.
If there is some reason to provide a real implementation the more likely candidate would be to add this to LFS, not Penlight.
Got it.
Hi there, foremost, thank you for your library, I am using your library for file manipulations and I just noticed that it fallbacks to
cp
/mv
on UNIX systems, unfortunately, I don't have those binaries on the target system, therefore, I'm kind of stuck to perform the move operation.Would you consider using FFI to perform atomic renames or copy here?