예제 #1
0
        public override void LoadDirectory(string path)
        {
            Items.Clear();
            DirectoryInfo di = new DirectoryInfo(path);

            FileSystemInfo[] infos = di.GetFileSystemInfos();
            int addUp = Convert.ToInt32(!PathExt.IsDriveRoot(path));

            if (addUp == 1)
            {
                Items.Add(new MoveUpObject());
            }
            foreach (FileSystemInfo info in infos)
            {
                if ((info.Attributes & FileAttributes.Hidden) != FileAttributes.Hidden)//OPTIONS: Show hidden files
                {
                    Items.Add(new WindowsFile(info));
                }
            }

            CurrentPlace = new WindowsFile(di);

            //check if drive has changed
            if (Root == null || Path.GetPathRoot(FullPath) != Root.Path)
            {
                Root = new WindowsDrive(DriveLetter);
            }
        }
예제 #2
0
 public WindowsFileSystem(string directory)
 {
     Root = new WindowsDrive(PathExt.GetDriveLetter(directory));
     LoadDirectory(directory);
 }
예제 #3
0
 public WindowsFileSystem(string directory)
 {
     Root = new WindowsDrive(PathExt.GetDriveLetter(directory));
     LoadDirectory(directory);
 }
예제 #4
0
 public void InitializeAfterDeserialization(StreamingContext context)
 {
     Root = new WindowsDrive(PathExt.GetDriveLetter(CurrentPlace.FullName));
     LoadDirectory(CurrentPlace.FullName);
 }