-
无限级COPY目录或文件
- /***
- * Finished: 2007-05-22
- * COPY files or folder
- */
- // example
- wlccopy('../test', '../bac');
- /**
- * copy files or folder
- * notice: $path2 not in $path1
- */
- function wlccopy($path1,$path2)
- {
- if(@is_dir($path1)){
- @mkdir($path2, 0777);
- @chmod($path2, 0777);
- $dir=@opendir($path1);
-
- while($file=@readdir($dir)){
- if($file=="." || $file==".."){
- continue;
- }elseif(@is_file($path1, $file)){
- @copy("$path1/$file", "$path2/$file");
- }else{
- wlccopy("$path1/$file", "$path2/$file");
- }
- }
- @closedir($dir);
- } else {
- if(@copy($path1,$path2)){
- return 1;
- }else {
- return 0;
- }
- }
- }
-
相关阅读:
Git操作命令2-在Git仓库里管理文件历史-分支操作
mvvmlight框架搭建VS版本不同导致的问题
wpf命令详解
wpf触发器
wpf控件模型
wpf中Interaction.Behaviors详解
wpf附加属性详解
wpf依赖属性概述
wpf体系结构
MySql5.7下载安装配置教程
-
原文地址:https://www.cnblogs.com/studio313/p/1061350.html
Copyright © 2020-2023
润新知