IEntryFactory.cs 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. using ICSharpCode.SharpZipLib.Core;
  2. namespace ICSharpCode.SharpZipLib.Zip
  3. {
  4. /// <summary>
  5. /// Defines factory methods for creating new <see cref="ZipEntry"></see> values.
  6. /// </summary>
  7. public interface IEntryFactory
  8. {
  9. /// <summary>
  10. /// Create a <see cref="ZipEntry"/> for a file given its name
  11. /// </summary>
  12. /// <param name="fileName">The name of the file to create an entry for.</param>
  13. /// <returns>Returns a <see cref="ZipEntry">file entry</see> based on the <paramref name="fileName"/> passed.</returns>
  14. ZipEntry MakeFileEntry(string fileName);
  15. /// <summary>
  16. /// Create a <see cref="ZipEntry"/> for a file given its name
  17. /// </summary>
  18. /// <param name="fileName">The name of the file to create an entry for.</param>
  19. /// <param name="useFileSystem">If true get details from the file system if the file exists.</param>
  20. /// <returns>Returns a <see cref="ZipEntry">file entry</see> based on the <paramref name="fileName"/> passed.</returns>
  21. ZipEntry MakeFileEntry(string fileName, bool useFileSystem);
  22. /// <summary>
  23. /// Create a <see cref="ZipEntry"/> for a file given its actual name and optional override name
  24. /// </summary>
  25. /// <param name="fileName">The name of the file to create an entry for.</param>
  26. /// <param name="entryName">An alternative name to be used for the new entry. Null if not applicable.</param>
  27. /// <param name="useFileSystem">If true get details from the file system if the file exists.</param>
  28. /// <returns>Returns a <see cref="ZipEntry">file entry</see> based on the <paramref name="fileName"/> passed.</returns>
  29. ZipEntry MakeFileEntry(string fileName, string entryName, bool useFileSystem);
  30. /// <summary>
  31. /// Create a <see cref="ZipEntry"/> for a directory given its name
  32. /// </summary>
  33. /// <param name="directoryName">The name of the directory to create an entry for.</param>
  34. /// <returns>Returns a <see cref="ZipEntry">directory entry</see> based on the <paramref name="directoryName"/> passed.</returns>
  35. ZipEntry MakeDirectoryEntry(string directoryName);
  36. /// <summary>
  37. /// Create a <see cref="ZipEntry"/> for a directory given its name
  38. /// </summary>
  39. /// <param name="directoryName">The name of the directory to create an entry for.</param>
  40. /// <param name="useFileSystem">If true get details from the file system for this directory if it exists.</param>
  41. /// <returns>Returns a <see cref="ZipEntry">directory entry</see> based on the <paramref name="directoryName"/> passed.</returns>
  42. ZipEntry MakeDirectoryEntry(string directoryName, bool useFileSystem);
  43. /// <summary>
  44. /// Get/set the <see cref="INameTransform"></see> applicable.
  45. /// </summary>
  46. INameTransform NameTransform { get; set; }
  47. }
  48. }