ICSharpCode.SharpZipLib.Zip.FastZipEvents.OnProcessDirectory C# (CSharp) 메소드

OnProcessDirectory() 공개 메소드

Fires the process directory delegate.
public OnProcessDirectory ( string directory, bool hasMatchingFiles ) : bool
directory string The directory being processed.
hasMatchingFiles bool Flag indicating if the directory has matching files as determined by the current filter.
리턴 bool
        public bool OnProcessDirectory(string directory, bool hasMatchingFiles)
        {
            bool result = true;
            EventHandler<DirectoryEventArgs> handler = ProcessDirectory;
            if (handler != null) {
                var args = new DirectoryEventArgs(directory, hasMatchingFiles);
                handler(this, args);
                result = args.ContinueRunning;
            }
            return result;
        }

Usage Example

예제 #1
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);
         }
     }
 }