protected void CopyFileOnFileSystem2(ZipFileItem sourceFile, ZipFileItem targetFile) { using (TempStream tempStream = Configuration.TempStreamFactory.CreateTempStream()) { sourceFile.Node.FileEntry.Extract(tempStream); tempStream.Position = 0; var zip = NodeRepository.ZipFile; NodeRepository.PerformWriteAction(() => zip.AddEntry(targetFile.QualifiedIdentifier, tempStream)); } }
protected List<string> GetResourceLockChain2(ZipFileItem file) { return file.Node.GetAncestors(false, false) .Select(n => n.FullName) .ToList(); }
protected void WriteFileStreamToFileSystem2(ZipFileItem fileItem, Stream input) { NodeRepository.PerformWriteAction(() => { NodeRepository.ZipFile.AddEntry(fileItem.QualifiedIdentifier, input); }); }
protected Stream OpenFileStreamFromFileSystem2(ZipFileItem fileItem) { return fileItem.Node.FileEntry.OpenReader(); }
protected void CopyFileOnFileSystem2(ZipFileItem sourceFile, ZipFileItem targetFile) { using (TempStream tempStream = Configuration.TempStreamFactory.CreateTempStream()) { sourceFile.Node.FileEntry.Extract(tempStream); tempStream.Position = 0; var zip = NodeRepository.ZipFile; NodeRepository.PerformWriteAction(() => zip.AddEntry(targetFile.QualifiedIdentifier, tempStream)); } }
protected void MoveFileOnFileSystem2(ZipFileItem sourceFile, ZipFileItem targetFile) { NodeRepository.PerformWriteAction(() => sourceFile.Node.FileEntry.FileName = targetFile.QualifiedIdentifier); }
protected void DeleteFileOnFileSystem2(ZipFileItem file) { Action action = () => NodeRepository.ZipFile.RemoveEntry(file.Node.FileEntry); NodeRepository.PerformWriteAction(action); }
protected List <string> GetResourceLockChain2(ZipFileItem file) { return(file.Node.GetAncestors(false, false) .Select(n => n.FullName) .ToList()); }
protected void WriteFileStreamToFileSystem2(ZipFileItem fileItem, Stream input) { NodeRepository.PerformWriteAction(() => { NodeRepository.ZipFile.AddEntry(fileItem.QualifiedIdentifier, input); }); }
protected Stream OpenFileStreamFromFileSystem2(ZipFileItem fileItem) { return(fileItem.Node.FileEntry.OpenReader()); }
protected void MoveFileOnFileSystem2(ZipFileItem sourceFile, ZipFileItem targetFile) { NodeRepository.PerformWriteAction(() => sourceFile.Node.FileEntry.FileName = targetFile.QualifiedIdentifier); }
protected void DeleteFileOnFileSystem2(ZipFileItem file) { Action action = () => NodeRepository.ZipFile.RemoveEntry(file.Node.FileEntry); NodeRepository.PerformWriteAction(action); }