public virtual DirectoryResource RenameDirectory(Site site, string relativePath, string newName) { //DirectoryEntry @new = new DirectoryEntry(GetRootDir(site), new_RelativeVirtualPath); DirectoryEntry dir = new DirectoryEntry(GetRootDir(site), relativePath); dir.Rename(newName); return dir; }
public virtual void DeleteDirectory(Site site, string relativePath) { var dir = new DirectoryEntry(GetRootDir(site), relativePath); dir.Delete(); }
public virtual DirectoryResource GetDirectory(Site site, string relativePath) { var dir = GetRootDir(site); if (!string.IsNullOrEmpty(relativePath)) dir = new DirectoryEntry(dir, relativePath); return dir; }
public virtual void AddDirectory(Site site, string parentRelativePath, string name) { DirectoryEntry dir = new DirectoryEntry(GetRootDir(site), GetRelativePath(parentRelativePath, name)); System.IO.Directory.CreateDirectory(dir.PhysicalPath); }
public virtual void RenameDirectory(Site site, string relativePath, string newName) { //DirectoryEntry @new = new DirectoryEntry(GetRootDir(site), new_RelativeVirtualPath); DirectoryEntry dir = new DirectoryEntry(GetRootDir(site), relativePath); dir.Rename(newName); FlushWebResourceCache(site, dir); }
public virtual bool IsDirectoryExists(Site site, string parentRelativePath, string name) { DirectoryEntry dir = new DirectoryEntry(GetRootDir(site), GetRelativePath(parentRelativePath, name)); return dir.Exists(); }
public virtual void DeleteDirectory(Site site, string relativePath) { var dir = new DirectoryEntry(GetRootDir(site), relativePath); dir.Delete(); FlushWebResourceCache(site, dir); }
public virtual bool IsDirectoryExists(Site site, string parentRelativePath, string name) { DirectoryEntry dir = new DirectoryEntry(GetRootDir(site), GetRelativePath(parentRelativePath, name)); return(dir.Exists()); }