protected void AddFile(IRealFile pFile) { if (null != pFile) { this.childFiles.Add(pFile); } }
public IEnumerable <RealFolder> GetDrives(IRealFile parent) { List <RealFolder> lst = new List <RealFolder>(); foreach (DriveInfo driveInfo in DriveInfo.GetDrives()) { FileTypes fileType = FileTypes.Disk; switch (driveInfo.DriveType) { case DriveType.Removable: if (driveInfo.Name.StartsWith("A:") || driveInfo.Name.StartsWith("B:")) { fileType = FileTypes.Floppy; } else { fileType = FileTypes.Disk; } break; case DriveType.CDRom: fileType = FileTypes.DVD; break; default: fileType = FileTypes.Disk; break; } lst.Add(new RealFolder(driveInfo.Name, parent, driveInfo.Name, fileType)); } return(lst); }
internal RealFile(String name, IRealFile parent, String fullPath, FileTypes fileType) { this.parent = parent; this.name = name; this.fullPath = fullPath; this.fileType = fileType; }
public IEnumerable <RealFolder> GetDrives(IRealFile parent) { List <RealFolder> lst = new List <RealFolder>(); lst.Add(new RealFolder("T:\\", parent, "T:\\", FileTypes.Disk)); lst.Add(new RealFolder("GAME:\\", parent, "GAME:\\", FileTypes.Disk)); return(lst); }
public IEnumerable<RealFolder> GetDrives(IRealFile parent) { List<RealFolder> lst = new List<RealFolder>(); lst.Add(new RealFolder("T:\\", parent, "T:\\", FileTypes.Disk)); lst.Add(new RealFolder("GAME:\\", parent, "GAME:\\", FileTypes.Disk)); return lst; }
public IEnumerable<RealFolder> GetDrives(IRealFile parent) { return new List<RealFolder>(); }
internal RealMyComputer(IRealFile desktop) : base("My Computer", desktop, "", FileTypes.MyComputer) { }
public IEnumerable<RealFolder> GetDrives(IRealFile parent) { throw new NotImplementedException(); }
internal RealComputer(String name, IRealFile domain) : base(name, domain, "\\\\" + name, FileTypes.Server) { }
internal RealNetwork(IRealFile desktop) : base("Network", desktop, "", FileTypes.Network) { }
internal RealFolder(String name, IRealFile parent, String fullPath, FileTypes fileType) : base(name, parent, fullPath, fileType) { }
internal RealDomain(String name, IRealFile network) : base(name, network, "", FileTypes.Domain) { }
public IEnumerable<RealFolder> GetDrives(IRealFile parent) { List<RealFolder> lst = new List<RealFolder>(); foreach (DriveInfo driveInfo in DriveInfo.GetDrives()) { FileTypes fileType = FileTypes.Disk; switch (driveInfo.DriveType) { case DriveType.Removable: if (driveInfo.Name.StartsWith("A:") || driveInfo.Name.StartsWith("B:")) { fileType = FileTypes.Floppy; } else { fileType = FileTypes.Disk; } break; case DriveType.CDRom: fileType = FileTypes.DVD; break; default: fileType = FileTypes.Disk; break; } lst.Add(new RealFolder(driveInfo.Name, parent, driveInfo.Name, fileType)); } return lst; }
public IEnumerable <RealFolder> GetDrives(IRealFile parent) { return(new List <RealFolder>()); }
public IEnumerable <RealFolder> GetDrives(IRealFile parent) { throw new NotImplementedException(); }