From: Remi V. <van...@la...> - 2003-11-16 11:35:35
|
"Sylvain LE GALL" <syl...@po...> writes: Hello, [...] firstly, for both SysUtil.mli and SysPath.mli, I would begin them by a type filename = string and replace string by filename where a file name (or directory name) is waited. It would make everything clearer. > SysUtil.mli : > > (** Pattern you can use to test file *) > type test_file = > Is_dev_block > | Is_dev_char > | Is_dir > | Exists > | Is_file > | Is_set_group_ID > | Has_sticky_bit > | Is_link > | Is_pipe > | Is_readable > | Is_writeable > | Size_not_null > | Is_socket > | Has_set_user_ID > | Is_exec > | Is_owned_by_user_ID > | Is_owned_by_group_ID > | Is_newer_than of string * string > | Is_older_than of string * string > | Has_same_device_and_inode of string * string > | And of test_file * test_file > | Or of test_file * test_file > | Not of test_file > | Match of string > | True > | False It's very interesting. Some possible amelioration : - What Is_newer_than mean exactly, what are those 2 string? - a Is_bigger_than of int and a Is_smaller_than of int could be useful; - for the newer and older, It could be useful to give a date directly; - I would use : Or of test_file list and And of test_file list; -- Rémi Vanicat |