Example #1
0
 /// <summary>
 /// Raise the ProcessDirectory event.
 /// </summary>
 /// <param name="directory">The directory name.</param>
 /// <param name="hasMatchingFiles">Flag indicating if the directory has matching files.</param>
 public void OnProcessDirectory(string directory, bool hasMatchingFiles)
 {
     if (ProcessDirectory != null)
     {
         DirectoryEventArgs args = new DirectoryEventArgs(directory, hasMatchingFiles);
         ProcessDirectory(this, args);
         alive_ = args.ContinueRunning;
     }
 }
		/// <summary>
		/// Raise the ProcessDirectory event.
		/// </summary>
		/// <param name="directory">The directory name.</param>
		/// <param name="hasMatchingFiles">Flag indicating if the directory has matching files.</param>
		public void OnProcessDirectory(string directory, bool hasMatchingFiles)
		{
			if ( ProcessDirectory != null ) {
				DirectoryEventArgs args = new DirectoryEventArgs(directory, hasMatchingFiles);
				ProcessDirectory(this, args);
				alive_ = args.ContinueRunning;
			}
		}
Example #3
0
		void ProcessDirectory(object sender, DirectoryEventArgs e)
		{
			if ( !e.HasMatchingFiles && CreateEmptyDirectories ) {
				if ( events_ != null ) {
					events_.OnProcessDirectory(e.Name, e.HasMatchingFiles);
				}
				
				if (e.Name != sourceDirectory_) {
					string cleanedName = nameTransform_.TransformDirectory(e.Name);
					ZipEntry entry = new ZipEntry(cleanedName);
					outputStream_.PutNextEntry(entry);
				}
			}
		}