public File(string name, string path, DateTime?createTime, DateTime?modifyTime, DateTime?accessTime, Int64?dataSize, Int64?diskSize, FileAccess[] fileAccess, Linkage[] linkage, Inode inode, Checksum[] checksum, string ident, FileCategoryEnum category, FileSystemTypeEnum type, string fileType) : this(name, path, createTime, modifyTime, accessTime, dataSize, diskSize, fileAccess, linkage, inode, checksum, category) { this.ident = string.IsNullOrEmpty(ident) ? "0" : ident; fstype = type; this.fileType = fileType; }
public File(string name, string path, DateTime? createTime, DateTime? modifyTime, DateTime? accessTime, Int64? dataSize, Int64? diskSize, FileAccess[] fileAccess, Linkage[] linkage, Inode inode, Checksum[] checksum, string ident, FileCategoryEnum category, FileSystemTypeEnum type, string fileType) : this(name, path, createTime, modifyTime, accessTime, dataSize, diskSize, fileAccess, linkage, inode, checksum, category) { this.ident = string.IsNullOrEmpty(ident) ? "0" : ident; fstype = type; this.fileType = fileType; }
public bool readFolderType(out String FolderName, out FileSystemTypeEnum FileSystemType) { bool Result = false; /* ## out */ FolderName = ""; /* ## out */ FileSystemType = FileSystemTypeEnum.fsUnknown; // find next folder separator int FinishIndex = this._SourcePath.IndexOf('/', this.StartIndex); // used later, to copy substring int ALen = 0; Result = (FinishIndex >= 0); if (Result) { ALen = (FinishIndex - this.StartIndex); // obtain substring FolderName = this._SourcePath.Substring(this.StartIndex, ALen); bool IsRoot = (FolderName == "^"); if (IsRoot) { FileSystemType = FileSystemTypeEnum.fsRoot; this.WasDrive = false; } else { bool IsDrive = (this.WasRoot); if (IsDrive) { FileSystemType = FileSystemTypeEnum.fsDrive; } else { FileSystemType = FileSystemTypeEnum.fsFolder; } // if (IsDrive) this.WasDrive = IsDrive; } // if (IsRoot) this.WasRoot = IsRoot; // mover indice al siguiente elemento this.StartIndex = (FinishIndex + 1); } // if (AIndex >= 0) return Result; }