I'm seeking comments from others that are familiar with CE internals regarding the implementation of a custom CopyFile routine.
CE does not support CopyFileEx, and I want to know the status when copying large files.
Obviously it should be very easy to create a basic file copy routine - just a few lines of code would do it.
My big concern is other repercussions - like file fragmentation, performance, and of course other things I'm not even aware of. These routines are normally implemented at a very low level in the file system for good reason. Any comments?
Dan East
Why not create your routine and do some performance testing? Performance might indicate something about fragmentation and other things, and vice versa. But maybe this might vary on different devices. It would be interesting to see some numbers.
This brings up something I was looking at a few days ago---how do you allocate a contiguous(unfragmented) nonvirtual memory block?
Dan, I was always under the impression that fragmentation within solid-state memory was not an issue because access time in one area is the same as any other. Obviously there's no head movement, which is what causes latencies when dealing with mechanical storage devices like hard drives.
I don't have any answer for the other parts of your question, but, as I understand it anyway, fragmentation isn't a concern (those programs that defragment memory might actually be doing as they claim by the way, but they shouldn't have any perceivable impact on performance).
Yeah, I feel the same way (
http://www.pocketmatrix.com/forums/view ... 5434#77612 ), however there are always those that use Microdrives, or network shares, which are most likely a HDD.
Dan East
Dan, SHFileOperation() might be exactly what you want. Although undocumented, it exists in a header and lib.
Thanks. I gave it a try, and found it's a little too high-level for me.
It will display its own statuc dialog box, so I lose the control I require.
Also I found the behavior isn't quite as documented. If a file already exists it is supposed to be overwritten, unless the FOF_RENAMEONCOLLISION flag is set, in which case it will use a unique name ("Copy (%d) of %s"). However even if FOF_RENAMEONCOLLISION is not set it will never overwrite the destination file - it always uses a unique name of the file already exists.
Thanks for the info though!
Dan East
That's too bad--those functions are somewhat similar. I thought it was interesting how one function used multiple arguments while the other used a single struct which seems useful to me for "reducing" ripple effect in changing multiple derived-class functions, especially headers.