Exemplo n.º 1
0
        public Folder(ApplicationFolderHierarchy folderHierarchy, string path) : base(folderHierarchy)
        {
            this.Folders          = new FileSystemObjects <Folder>(this, folderHierarchy);
            this.Files            = new FileSystemObjects <File>(this, folderHierarchy);
            this.moduleAssemblies = new List <IModuleAssembly>();
            this.modules          = new List <Module>();
            this.Name             = Path.GetFileName(path);

            fullPath = path;
        }
Exemplo n.º 2
0
        public File(ApplicationFolderHierarchy folderHierarchy, FileInfo systemLocalFile, StringBuilder info = null) : base(folderHierarchy)
        {
            FileInfo tempFile = null;

            this.Name            = systemLocalFile.Name;
            this.SystemLocalFile = systemLocalFile;
            this.Info            = info;

            if (!systemLocalFile.Exists)
            {
                tempFile = new FileInfo(Path.Combine(Path.GetTempPath(), "Temp" + systemLocalFile.Extension));

                using (tempFile.Create())
                {
                    this.Icon = tempFile.GetIcon <Icon>();
                }

                tempFile.Delete();
            }
            else
            {
                this.Icon = systemLocalFile.GetIcon <Icon>();
            }
        }
Exemplo n.º 3
0
 public FileSystem(ApplicationFolderHierarchy folderHierarchy)
 {
     this.folderHierarchy = folderHierarchy;
 }
Exemplo n.º 4
0
 public FileSystemObjects(FileSystemObject fileSystemObject, ApplicationFolderHierarchy folderHierarchy)
 {
     this.folderHierarchy  = folderHierarchy;
     this.fileSystemObject = fileSystemObject;
 }