示例#1
0
文件: File.cs 项目: pgodwin/DiscUtils
 public File(Context context, CatalogNodeId nodeId, CommonCatalogFileInfo catalogInfo)
 {
     Context      = context;
     NodeId       = nodeId;
     _catalogInfo = catalogInfo;
     //_hasCompressionAttribute =
     //    Context.Attributes.Find(new AttributeKey(NodeId, CompressionAttributeName)) != null;
     _hasCompressionAttribute = false;
 }
示例#2
0
        private static CommonCatalogFileInfo ParseDirEntryData(byte[] dirEntryData)
        {
            CatalogRecordType type = (CatalogRecordType)EndianUtilities.ToInt16BigEndian(dirEntryData, 0);

            CommonCatalogFileInfo result = null;

            switch (type)
            {
            case CatalogRecordType.FolderRecord:
                result = new CatalogDirInfo();
                break;

            case CatalogRecordType.FileRecord:
                result = new CatalogFileInfo();
                break;

            default:
                throw new NotImplementedException("Unknown catalog record type: " + type);
            }

            result.ReadFrom(dirEntryData, 0);
            return(result);
        }
示例#3
0
 public Directory(Context context, CatalogNodeId nodeId, CommonCatalogFileInfo fileInfo)
     : base(context, nodeId, fileInfo)
 {
 }
示例#4
0
 public Symlink(Context context, CatalogNodeId nodeId, CommonCatalogFileInfo catalogInfo)
     : base(context, nodeId, catalogInfo)
 {
 }