Module Find


module Find: sig  end
Scanning directory trees for matching files


This is based on the find(1) program and perl's File::Find module.

It's pretty simple. You define the rules to see if a file matches, and run it on a directory, and get back a list of matching files.

It also needs lots of work. For example, it doesn't have any way to stop a directory from being followed yet. There's many other shortcomings for now. You've been warned.

type size = [ `Bytes of int | `Kilobytes of int | `Megabytes of int ] 
Type that describes file sizes
type size_test = [ `EqualTo of size
| `LargerThan of size
| `SmallerThan of size ]
Type that describes file size tests
type time_test = [ `After of int32 | `At of int32 | `Before of int32 ] 
Type that describes file timestamp tests
type test = [ `Accessed of time_test
| `And of test list
| `Created of time_test
| `Eval of string -> Unix.stats -> bool
| `False
| `Group of int
| `IName of string
| `Modified of time_test
| `Name of string
| `Or of test list
| `Owner of int
| `Perms of Unix.file_perm
| `Regexp of string
| `Size of size_test
| `True
| `Type of Unix.file_kind ]
The type of file tests
type t 
The type of a find object
val make : test -> t
Make a find object that obeys the given rules.
val find : t -> string -> string list
Run the tests on all files in a directory.
Returns a list of all matching files.