1(* Operations on file names *) 2 3val current_dir_name : string; 4 (* The conventional name for the current directory 5 (e.g. [.] in Unix). *) 6val concat : string -> string -> string; 7 (* [concat dir file] returns a file name that designates file 8 [file] in directory [dir]. *) 9val is_absolute : string -> bool; 10 (* Return [true] if the file name is absolute or starts with an 11 explicit reference to the current directory ([./] or [../] in 12 Unix), and [false] if it is relative to the current directory. *) 13val check_suffix : string -> string -> bool; 14 (* [check_suffix name suff] returns [true] if the filename [name] 15 ends with the suffix [suff]. *) 16val chop_suffix : string -> string -> string; 17 (* [chop_suffix name suff] removes the suffix [suff] from 18 the filename [name]. The behavior is undefined if [name] does not 19 end up with the suffix [suff]. *) 20val basename : string -> string; 21val dirname : string -> string; 22 (* Split a file name into directory name / base file name. 23 [concat (dirname name) (basename name)] returns a file name 24 which is equivalent to [name]. Moreover, after setting the 25 current directory to [dirname name] (with [sys__chdir]), 26 references to [basename name] (which is a relative file name) 27 designate the same file as [name] before the call to [chdir]. *) 28;; 29