I'll have to dig it out to make sure you see it, but one thing I wanted you to consider was to use "move" instead of "copy" in message base packing. (Well anywhere really, but msg base packing is the obvious one).
Are you saying these backwards? Mystic uses rename already, so I am assuming you're saying that you'd need it to use copy instead?
On 12/22/18, g00r00 said the following...
Are you saying these backwards? Mystic uses rename already, so I assuming you're saying that you'd need it to use copy instead?
Bah, you got me.
Yes, can you use "move" instead of "rename".
Yes, can you use "move" instead of "rename".
Move = rename
On 24-Dec-2018 02:58, apam wrote to deon <=-
Move = rename
You want copy and delete the original i think, to work across devices.
On 24-Dec-2018 02:58, apam wrote to deon <=-
Move = rename
You want copy and delete the original i think, to work across dev
Some OSs (e.g. Linux) may use the same command for both, which is why
a "mv" of a large file to the same device is very quick, while the "m
same file to a different device takes a long time, because the file ha physically moved instead of simply renamed.
But technically there is a difference between a "move" and a "rename" operation at a low level.
On 24-Dec-2018 07:04, apam wrote to vk3jed <=-
Yeah, but I wasn't referring to commands, rather the programming interface.
But technically there is a difference between a "move" and a "rename" operation at a low level.
I think you'll find at the syscall level (or even in glibc) there is no move operation (there's no copy operation either you have to open the
file read the data and write it to another file, then close the files.) The "mv" command will rename on the same device or copy the file then delete it across devices as you say.
If there is a move operation in pascal, (I wouldn't know) it would be implemented in the standard library, and not a system call feature of
the kernel.
Are you saying these backwards? Mystic uses rename already, so I am assuming you're saying that you'd need it to use copy instead?
Bah, you got me.
Yes, can you use "move" instead of "rename".
"mv" across devices is different to "mv" on the same device.
In Pascal terms, if I recall, "rename" just updates the inode, whereas "move" is as you say, copy/delete.
I do know also though there are some who are not docker users, but have had their data on a different device (I recall somebody had their data
on a USB stick) and thus rename is a problem for them too.
Okay. I think I may have to experiment with this a little bit, because
if I don't rename, then I believe I have to copy while will be significantly slower.
Worst case scenario I can make it an option to copy or rename in the .ini file but maybe I could also name the temp files in the same directory as the message base files (instead of using the temp directories) and that would allow me to rename I think.
I think this would work better. Create a temp dir in the message bases,
do the stuff, and rename back and delete the temp dir. (If the tempdir fails to delete, something went wrong.)
There is no Move in FPC that I know of, just a rename and copy.
I want to avoid using copy as much as I can since its obviously much slower.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 407 |
Nodes: | 16 (2 / 14) |
Uptime: | 01:43:43 |
Calls: | 8,551 |
Calls today: | 3 |
Files: | 13,216 |
Messages: | 5,924,511 |