Posted on 13-01-2009
Filed Under (技术) by waterlin

1) 先把目录打包,再把File::copy来复制这个打成包的文件到目的地,再解压。

推荐使用Archive::Tar作为处理压缩与解压的工具。

2) 用File::Copy::Recursive来直接拷贝目录。

(3) Comments    Read More   

Comments

沉香竹 on 4 September, 2009 at 5:43 pm #

File::copy不能复制目录树么?

(刚学perl,遇到很多问题呀)


WaterLin on 4 September, 2009 at 6:10 pm #

[Comment ID #32961 Will Be Quoted Here]
我记得好像不能拷贝目录,如果你要拷贝目录的话,用File::NCopy行:
http://search.cpan.org/~chorny/File-NCopy-0.36/lib/File/NCopy.pm


沉香竹 on 4 September, 2009 at 7:00 pm #

呃呃。。
那个File::NCopy和File::Copy::Recursive都是第三方的吧,这样就不方便了


Post a Comment
Name:
Email:
Website:
Comments: