1 Followers
26 Following
plotshovel70

plotshovel70

SPOILER ALERT!

1. .net delete file or folder (folder ends with '\') publicstaticboolFilePicDelete (stringpath) boolret = false; System.IO.FileInfofile = newSystem.IO.FileInfo (path); if (file.Exists) file .Delete (); ret = true; returnret;

2. .net copy file publicvoidcopyFile (stringObjectFile, StringSourceFile) (stringsourceFile = Server.MapPath (SourceFile); stringobjectFile = Server.MapPath (ObjectFile); if (Method.IO.File.Exists (sourceFile)) System.IO.File .Copy (sourceFile, objectFile, true);
three. .net build folder privatevoidcreateFolder (stringpath) if (! hard drive recovery software .Exists (Server.MapPath (path))) Directory.CreateDirectory (Server.MapPath (path));