-
Notifications
You must be signed in to change notification settings - Fork 26
SizeQueryable
Julien Amsellem edited this page Dec 8, 2017
·
4 revisions
This interface is meant for searching files based on there size. This API provides many ways to specify how you want to filter files.
-
Equal(int value)
: search for a specific size in kilobyte (Kb) -
Equal(int value, SizeUnit u)
: search for a specific file with a specified unit (Kb, Mb, Gb) -
Equal(Sizes size)
: search for a predefined size range- Empty: empty files
- Unknown: files with unknown size
- Tiny: 0 KB < size <= 10 KB
- Small: 10 KB < size <= 100 KB
- Medium: 100 KB < size <= 1 MB
- Large: 1 MB < size <= 16 MB
- Huge: 16 MB < size <= 128 MB
- Gigantic: size > 128 MB
-
GreaterThan(int value)
: files which size is strictly greater than the specified value (in Kb) -
GreaterThan(int value, SizeUnit u)
: files which size is strictly greater than the specified value in the specified unit -
GreaterOrEqualThan(int value)
: files which size is greater or equal than the specified value (in Kb) -
GreaterOrEqualThan(int value, SizeUnit u)
: files which size is greater or equal than the specified value in the specified unit -
LessThan(int value)
: files which size is strictly less than the specified value (in Kb) -
LessThan(int value, SizeUnit u)
: files which size is strictly less than the specified value in the specified unit -
LessOrEqualThan(int value)
: files which size is less or equal than the specified value (in Kb) -
LessOrEqualThan(int value, SizeUnit u)
: files which size is less or equal than the specified value in the specified unit -
Between(int min, int max)
: files which size is in the range of [min ... max] in Kb -
Between(int min, int max, SizeUnit u)
: files which size is in the range of [min ... max] in the specified unit -
Between(int min, SizeUnit umin, int max, SizeUnit umax)
: files which size is in the range of [min ... max] in the specified unit for both limits
var everything = new Everything();
var results = everything.Search()
.Size
.Equal(100);
var everything = new Everything();
var results = everything.Search()
.Size
.Equal(1, SizeUnit.Mb);
var everything = new Everything();
var results = everything.Search()
.Size
.Equal(Sizes.Huge);
var everything = new Everything();
var results = everything.Search()
.Size
.GreaterThan(1, SizeUnit.Gb);
var everything = new Everything();
var results = everything.Search()
.Size
.LessOrEqual(10, SizeUnit.Kb);
var everything = new Everything();
var results = everything.Search()
.Size
.Between(100, 1000);
var everything = new Everything();
var results = everything.Search()
.Size
.Between(5, 10, SizeUnit.Mb);
var everything = new Everything();
var results = everything.Search()
.Size
.Between(100, SizeUnit.Kb, 100, SizeUnit.Mb);