Ejemplo n.º 1
0
        public DirectoryItem getDir(string name)
        {
            FileTreeItem item = getItem(name);

            if (item is DirectoryItem)
            {
                return((DirectoryItem)item);
            }
            return(null);
        }
Ejemplo n.º 2
0
        public FileItem getFile(string name)
        {
            FileTreeItem item = getItem(name);

            if (item is FileItem)
            {
                return((FileItem)item);
            }
            return(null);
        }
Ejemplo n.º 3
0
 /***** PRIVATE *****/
 private static void buildRecursiveDirectory(string path, FileTreeItem item)
 {
     if (item is DirectoryItem)
     {
         var           directory = (DirectoryItem)item;
         DirectoryInfo dir_info  = Directory.CreateDirectory(Path.Combine(path, directory.path));
         if (directory.name == Dirs.DOT_SKY_DIR)
         {
             dir_info.Attributes |= FileAttributes.Hidden;
         }
         foreach (FileTreeItem _item in directory.items)
         {
             buildRecursiveDirectory(path, _item);
         }
     }
     else if (item is FileItem)
     {
     }                                          // do nothing
 }