internal FileZipBundledItem(IZipArchiveDirectory archiveDir, bool cached)
        {
            var inDir = archiveDir;

            Name = new DbItemName
            {
                Name     = inDir.Name,
                SafeName = FileEngineDefaults.CreateSafeName(inDir.Name)
            };
            Content = new DirContent(inDir.Entries, cached);
        }
Esempio n. 2
0
        public FileItem(IFileOperations fileManager, string filePath)
        {
            _fileManager = fileManager;

            var dirPath = Path.GetFileNameWithoutExtension(filePath);

            Name = new DbItemName
            {
                Name     = dirPath,
                SafeName = FileEngineDefaults.CreateSafeName(dirPath),
            };
            Content = new FileContent(_fileManager, filePath);
        }
        public FileZipItem(ZipArchiveEntry entry)
        {
            var entry1 = entry;

            var entryName = Path.GetFileNameWithoutExtension(entry1.Name);

            Name = new DbItemName
            {
                Name     = entryName,
                SafeName = FileEngineDefaults.CreateSafeName(entryName),
            };
            Content = new FileContent(entry1);
        }
Esempio n. 4
0
        internal FileBundledItem(IFileOperations fileManager, string dirPath, bool cached)
        {
            _fileManager = fileManager;

            var dirName = FileEngineDefaults.ClosestPathName(dirPath);

            Name = new DbItemName
            {
                Name     = dirName,
                SafeName = FileEngineDefaults.CreateSafeName(dirName),
            };

            Content = new DirContent(_fileManager, dirPath, cached);
        }
Esempio n. 5
0
        public FileSet(IFileOperations fileManager, string inDir, bool cached)
        {
            _fileManager = fileManager;
            _inDir       = inDir;
            _cached      = cached;

            var dirName = FileEngineDefaults.ClosestPathName(_inDir);

            Name = new DbItemName
            {
                Name     = dirName,
                SafeName = FileEngineDefaults.CreateSafeName(dirName),
            };
        }