forked from icsharpcode/SharpZipLib
/
IEntryFactory.cs
69 lines (59 loc) · 3.12 KB
/
IEntryFactory.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
using System;
using ICSharpCode.SharpZipLib.Core;
using static ICSharpCode.SharpZipLib.Zip.ZipEntryFactory;
namespace ICSharpCode.SharpZipLib.Zip
{
/// <summary>
/// Defines factory methods for creating new <see cref="ZipEntry"></see> values.
/// </summary>
public interface IEntryFactory
{
/// <summary>
/// Create a <see cref="ZipEntry"/> for a file given its name
/// </summary>
/// <param name="fileName">The name of the file to create an entry for.</param>
/// <returns>Returns a <see cref="ZipEntry">file entry</see> based on the <paramref name="fileName"/> passed.</returns>
ZipEntry MakeFileEntry(string fileName);
/// <summary>
/// Create a <see cref="ZipEntry"/> for a file given its name
/// </summary>
/// <param name="fileName">The name of the file to create an entry for.</param>
/// <param name="useFileSystem">If true get details from the file system if the file exists.</param>
/// <returns>Returns a <see cref="ZipEntry">file entry</see> based on the <paramref name="fileName"/> passed.</returns>
ZipEntry MakeFileEntry(string fileName, bool useFileSystem);
/// <summary>
/// Create a <see cref="ZipEntry"/> for a file given its actual name and optional override name
/// </summary>
/// <param name="fileName">The name of the file to create an entry for.</param>
/// <param name="entryName">An alternative name to be used for the new entry. Null if not applicable.</param>
/// <param name="useFileSystem">If true get details from the file system if the file exists.</param>
/// <returns>Returns a <see cref="ZipEntry">file entry</see> based on the <paramref name="fileName"/> passed.</returns>
ZipEntry MakeFileEntry(string fileName, string entryName, bool useFileSystem);
/// <summary>
/// Create a <see cref="ZipEntry"/> for a directory given its name
/// </summary>
/// <param name="directoryName">The name of the directory to create an entry for.</param>
/// <returns>Returns a <see cref="ZipEntry">directory entry</see> based on the <paramref name="directoryName"/> passed.</returns>
ZipEntry MakeDirectoryEntry(string directoryName);
/// <summary>
/// Create a <see cref="ZipEntry"/> for a directory given its name
/// </summary>
/// <param name="directoryName">The name of the directory to create an entry for.</param>
/// <param name="useFileSystem">If true get details from the file system for this directory if it exists.</param>
/// <returns>Returns a <see cref="ZipEntry">directory entry</see> based on the <paramref name="directoryName"/> passed.</returns>
ZipEntry MakeDirectoryEntry(string directoryName, bool useFileSystem);
/// <summary>
/// Get/set the <see cref="INameTransform"></see> applicable.
/// </summary>
INameTransform NameTransform { get; set; }
/// <summary>
/// Get the <see cref="TimeSetting"/> in use.
/// </summary>
TimeSetting Setting { get; }
/// <summary>
/// Get the <see cref="DateTime"/> value to use when <see cref="Setting"/> is set to <see cref="TimeSetting.Fixed"/>,
/// or if not specified, the value of <see cref="DateTime.Now"/> when the class was the initialized
/// </summary>
DateTime FixedDateTime { get; }
}
}