[Jslib] Directory Copy

Pete Collins pete at mozdevgroup.com
Wed May 2 11:38:18 PDT 2007



Gereon Sommer wrote:

>Hi,
>
>is it possible to copy whole directories with their complete content 
>with jsLib? I found in the documentation only methods to move or remove 
>directories but not to copy.
>  
>

Yea, I need to add that, can't believe I missed it ...

You can do this:

var f = new File("/tmp/somedir");

var dest = new File("/tmp/somedest");

f.nsIFile.copyTo(dest.nsIFile, null);

--pete

-- 
Pete Collins - Founder, Mozdev Group Inc.
www.mozdevgroup.com
Mozilla Software Development Solutions
tel: 1-719-302-5811
fax: 1-719-302-5813



More information about the Jslib mailing list