1、.net删除文件或者文件夹(文件夹以"\"结尾)        public static bool FilePicDelete(string path)     {         bool ret = false;         System.IO.FileInfo file = new System.IO.FileInfo(path);         if (file.Exists)         {             file.Delete();             ret = true;         }         return ret;     } 2、.net复制文件   public void copyFile(string ObjectFile,String SourceFile )     {         string sourceFile = Server.MapPath(SourceFile);         string objectFile = Server.MapPath(ObjectFile);         if (System.IO.File.Exists(sourceFile))         {             System.IO.File.Copy(sourceFile, objectFile, true);         }     } 3、.net创建文件夹 private void createFolder(string path)     {         if (!Directory.Exists(Server.MapPath(path)))             Directory.CreateDirectory(Server.MapPath(path));     }

相关文章:

  • 2021-11-20
  • 2022-12-23
  • 2021-04-19
  • 2021-11-30
  • 2022-12-23
  • 2021-09-02
  • 2022-12-23
猜你喜欢
  • 2021-03-31
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-22
相关资源
相似解决方案