예제 #1
0
        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));
            }
        }
예제 #2
0
 protected List<string> GetResourceLockChain2(ZipFileItem file) {
     return file.Node.GetAncestors(false, false)
       .Select(n => n.FullName)
       .ToList();
 }
예제 #3
0
 protected void WriteFileStreamToFileSystem2(ZipFileItem fileItem, Stream input) {
     NodeRepository.PerformWriteAction(() => {
         NodeRepository.ZipFile.AddEntry(fileItem.QualifiedIdentifier, input);
     });
 }
예제 #4
0
 protected Stream OpenFileStreamFromFileSystem2(ZipFileItem fileItem) {
     return fileItem.Node.FileEntry.OpenReader();
 }
예제 #5
0
        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));
            }
        }
예제 #6
0
 protected void MoveFileOnFileSystem2(ZipFileItem sourceFile, ZipFileItem targetFile) {
     NodeRepository.PerformWriteAction(() => sourceFile.Node.FileEntry.FileName = targetFile.QualifiedIdentifier);
 }
예제 #7
0
 protected void DeleteFileOnFileSystem2(ZipFileItem file) {
     Action action = () => NodeRepository.ZipFile.RemoveEntry(file.Node.FileEntry);
     NodeRepository.PerformWriteAction(action);
 }
예제 #8
0
 protected List <string> GetResourceLockChain2(ZipFileItem file)
 {
     return(file.Node.GetAncestors(false, false)
            .Select(n => n.FullName)
            .ToList());
 }
예제 #9
0
 protected void WriteFileStreamToFileSystem2(ZipFileItem fileItem, Stream input)
 {
     NodeRepository.PerformWriteAction(() => {
         NodeRepository.ZipFile.AddEntry(fileItem.QualifiedIdentifier, input);
     });
 }
예제 #10
0
 protected Stream OpenFileStreamFromFileSystem2(ZipFileItem fileItem)
 {
     return(fileItem.Node.FileEntry.OpenReader());
 }
예제 #11
0
 protected void MoveFileOnFileSystem2(ZipFileItem sourceFile, ZipFileItem targetFile)
 {
     NodeRepository.PerformWriteAction(() => sourceFile.Node.FileEntry.FileName = targetFile.QualifiedIdentifier);
 }
예제 #12
0
        protected void DeleteFileOnFileSystem2(ZipFileItem file)
        {
            Action action = () => NodeRepository.ZipFile.RemoveEntry(file.Node.FileEntry);

            NodeRepository.PerformWriteAction(action);
        }