Show / Hide Table of Contents

Class ExtendedPathFilter

ExtendedPathFilter filters based on name, file size, and the last write time of the file.

Inheritance
System.Object
PathFilter
ExtendedPathFilter
Implements
IScanFilter
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: ICSharpCode.SharpZipLib.Core
Assembly: ICSharpCode.SharpZipLib.dll
Syntax
public class ExtendedPathFilter : PathFilter, IScanFilter
Remarks

Provides an example of how to customise filtering.

Constructors

| Improve this Doc View Source

ExtendedPathFilter(String, DateTime, DateTime)

Initialise a new instance of ExtendedPathFilter.

Declaration
public ExtendedPathFilter(string filter, DateTime minDate, DateTime maxDate)
Parameters
Type Name Description
System.String filter

The filter to apply.

System.DateTime minDate

The minimum System.DateTime to include.

System.DateTime maxDate

The maximum System.DateTime to include.

| Improve this Doc View Source

ExtendedPathFilter(String, Int64, Int64)

Initialise a new instance of ExtendedPathFilter.

Declaration
public ExtendedPathFilter(string filter, long minSize, long maxSize)
Parameters
Type Name Description
System.String filter

The filter to apply.

System.Int64 minSize

The minimum file size to include.

System.Int64 maxSize

The maximum file size to include.

| Improve this Doc View Source

ExtendedPathFilter(String, Int64, Int64, DateTime, DateTime)

Initialise a new instance of ExtendedPathFilter.

Declaration
public ExtendedPathFilter(string filter, long minSize, long maxSize, DateTime minDate, DateTime maxDate)
Parameters
Type Name Description
System.String filter

The filter to apply.

System.Int64 minSize

The minimum file size to include.

System.Int64 maxSize

The maximum file size to include.

System.DateTime minDate

The minimum System.DateTime to include.

System.DateTime maxDate

The maximum System.DateTime to include.

Properties

| Improve this Doc View Source

MaxDate

Get/set the maximum System.DateTime value that will match for this filter.

Declaration
public DateTime MaxDate { get; set; }
Property Value
Type Description
System.DateTime
Remarks

Files with a LastWrite time greater than this value are excluded by the filter.

| Improve this Doc View Source

MaxSize

Get/set the maximum size/length for a file that will match this filter.

Declaration
public long MaxSize { get; set; }
Property Value
Type Description
System.Int64
Remarks

The default value is System.Int64.MaxValue

Exceptions
Type Condition
System.ArgumentOutOfRangeException

value is less than zero or less than MinSize

| Improve this Doc View Source

MinDate

Get/set the minimum System.DateTime value that will match for this filter.

Declaration
public DateTime MinDate { get; set; }
Property Value
Type Description
System.DateTime
Remarks

Files with a LastWrite time less than this value are excluded by the filter.

| Improve this Doc View Source

MinSize

Get/set the minimum size/length for a file that will match this filter.

Declaration
public long MinSize { get; set; }
Property Value
Type Description
System.Int64
Remarks

The default value is zero.

Exceptions
Type Condition
System.ArgumentOutOfRangeException

value is less than zero; greater than MaxSize

Methods

| Improve this Doc View Source

IsMatch(String)

Test a filename to see if it matches the filter.

Declaration
public override bool IsMatch(string name)
Parameters
Type Name Description
System.String name

The filename to test.

Returns
Type Description
System.Boolean

True if the filter matches, false otherwise.

Overrides
PathFilter.IsMatch(String)
Exceptions
Type Condition
System.IO.FileNotFoundException

The doesnt exist

Implements

IScanFilter
  • Improve this Doc
  • View Source
In This Article
Back to top Copyright © 2000-2022 SharpZipLib Contributors