Directory Copy

View: New views
2 Messages — Rating Filter:   Alert me  

Directory Copy

by zioniscool :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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.


Regards,

Gereon
_______________________________________________
Jslib mailing list
Jslib@...
http://mozdev.org/mailman/listinfo/jslib

Re: Directory Copy

by Pete Collins :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



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

_______________________________________________
Jslib mailing list
Jslib@...
http://mozdev.org/mailman/listinfo/jslib