Exemple #1
0
 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;
 }
Exemple #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);
        }
Exemple #3
0
 public Directory(Context context, CatalogNodeId nodeId, CommonCatalogFileInfo fileInfo)
     : base(context, nodeId, fileInfo)
 {
 }
Exemple #4
0
 public Symlink(Context context, CatalogNodeId nodeId, CommonCatalogFileInfo catalogInfo)
     : base(context, nodeId, catalogInfo)
 {
 }