Esempio n. 1
0
 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;
 }
Esempio n. 2
0
 public virtual void DeleteDirectory(Site site, string relativePath)
 {
     var dir = new DirectoryEntry(GetRootDir(site), relativePath);
     dir.Delete();
 }
Esempio n. 3
0
 public virtual DirectoryResource GetDirectory(Site site, string relativePath)
 {
     var dir = GetRootDir(site);
     if (!string.IsNullOrEmpty(relativePath))
         dir = new DirectoryEntry(dir, relativePath);
     return dir;
 }
Esempio n. 4
0
 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);
 }
Esempio n. 5
0
 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);
 }
Esempio n. 6
0
 public virtual bool IsDirectoryExists(Site site, string parentRelativePath, string name)
 {
     DirectoryEntry dir = new DirectoryEntry(GetRootDir(site), GetRelativePath(parentRelativePath, name));
     return dir.Exists();
 }
Esempio n. 7
0
 public virtual void DeleteDirectory(Site site, string relativePath)
 {
     var dir = new DirectoryEntry(GetRootDir(site), relativePath);
     dir.Delete();
     FlushWebResourceCache(site, dir);
 }
Esempio n. 8
0
        public virtual bool IsDirectoryExists(Site site, string parentRelativePath, string name)
        {
            DirectoryEntry dir = new DirectoryEntry(GetRootDir(site), GetRelativePath(parentRelativePath, name));

            return(dir.Exists());
        }