Example #1
0
 /// <summary>
 /// Create from a file
 /// </summary>
 /// <param name="ef"></param>
 /// <param name="original"></param>
 /// <param name="ztime"></param>
 public ZipFSEntry(IEntryFactory ef, FileSystemInfo original, ZipTime ztime)
 {
     _ze = null;
     _ztime = ztime;
     if (original is FileInfo)
         _ze = ef.MakeFileEntry(original.FullName, true);
     else
     {
         string nobs = Utils.BackslashRemove(original.FullName);
         _ze = ef.MakeDirectoryEntry(nobs, true);
     }
 }
Example #2
0
 /// <summary>
 /// Create from a file
 /// </summary>
 /// <param name="ef"></param>
 /// <param name="original"></param>
 /// <param name="ztime"></param>
 public ZipFSEntry(IEntryFactory ef, FileSystemInfo original, ZipTime ztime)
 {
     _ze    = null;
     _ztime = ztime;
     if (original is FileInfo)
     {
         _ze = ef.MakeFileEntry(original.FullName, true);
     }
     else
     {
         string nobs = Utils.BackslashRemove(original.FullName);
         _ze = ef.MakeDirectoryEntry(nobs, true);
     }
 }
Example #3
0
 private void ProcessDirectory(object sender, DirectoryEventArgs e)
 {
     if (!e.HasMatchingFiles && CreateEmptyDirectories)
     {
         if (_events != null)
         {
             _events.OnProcessDirectory(e.Name, e.HasMatchingFiles);
         }
         if (e.ContinueRunning && (e.Name != _sourceDirectory))
         {
             ZipEntry entry = _entryFactory.MakeDirectoryEntry(e.Name);
             _outputStream.PutNextEntry(entry);
         }
     }
 }
Example #4
0
 private void ProcessDirectory(object sender, DirectoryEventArgs e)
 {
     if (!e.HasMatchingFiles && CreateEmptyDirectories)
     {
         if (events_ != null)
         {
             events_.OnProcessDirectory(e.Name, e.HasMatchingFiles);
         }
         if (e.ContinueRunning && e.Name != sourceDirectory_)
         {
             ZipEntry entry = entryFactory_.MakeDirectoryEntry(e.Name);
             outputStream_.PutNextEntry(entry);
         }
     }
 }
 public ZipEntry MakeDirectoryEntry(string directoryName)
 {
     return(_wrappedEntryFactory.MakeDirectoryEntry(directoryName));
 }