public Dir(DirectoryInfo _dinfo) { if (_dinfo.Exists) { CurrentDirInfo = _dinfo; Info = new DirInfo(CurrentDirInfo); } else { throw new Exception("Directory not found"); } }
public Dir(String _dpath) { if (Directory.Exists(_dpath)) { CurrentDirInfo = new DirectoryInfo(_dpath); Info = new DirInfo(CurrentDirInfo); } else { throw new Exception("Directory not found"); } }
public File(FileInfo _finfo) { if (_finfo.Exists) { CurrentFileInfo = _finfo; Info = new FilesInfo(CurrentFileInfo); } else { throw new Exception("File not found"); } }