Coping files and folders
Joel
joelcnz at gmail.com
Thu Jan 24 22:23:20 PST 2013
Sounds cool. I've bookmarked your github hub link.
Just wondering with this:
// parallel foreach for regular files
foreach(fn ; taskPool.parallel(files,100)) {
string dfn = destRoot ~ fn[srcLen..$];
copy(fn,dfn);
}
What is the 100 number for?
On Friday, 25 January 2013 at 05:30:11 UTC, Jay Norwood wrote:
> On Thursday, 24 January 2013 at 07:41:23 UTC, Jacob Carlborg
> wrote:
>
>> Someone posted code in these newsgroups of a parallel
>> implementation of copy and remove.
>
> I posted a parallel implementation a while back, and also put
> it on github.
>
> The parallel trick is to create the folder structure first,
> then populate the folders with the files. Best for ssd drives.
>
> I also wrote a copy version that orders file sequence on disk
> efficiently, using write through, and posted it. This speeds
> up any subsequent file system operations done in the directory
> order as if you have done a defrag. Great for hard drives, but
> not needed for ssd.
>
> https://github.com/jnorwood
More information about the Digitalmars-d-learn
mailing list