public static void CreateFolderFromFilePath(string filePath) { if (!File.Exists(filePath)) { Directory.CreateDirectory(UFile.GetFolder(filePath)); } }
public static void OpenContainingFolder(string filePath) { try { Process.Start("explorer select,", filePath); } catch { Open(UFile.GetFolder(filePath)); } }
private void Save() { if (BeforeSave != null) { BeforeSave(this, EventArgs.Empty); } bs.Visible = bc.Visible = false; be.Visible = bd.Visible = true; fu.Visible = false; if (PostedFileName != "") { string path = UWeb.MapPath(Url); if (path == "") { path = UrlFolder; } { UFile.Delete(path); } if (!RetainFileNameInEdit) { path = UFile.GetFolder(path) + PostedFileName; } SaveAs(path); } SetValue(Url, ToolTip); if (AfterSave != null) { AfterSave(this, EventArgs.Empty); } }
public static void Unzip(string zipFilePath, bool deleteZipFile) { Unzip(zipFilePath, UFile.GetFolder(zipFilePath), "", deleteZipFile); }