home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Tools / Languages / Caml Light 0.61 / Source / src / lib / filename.mli < prev    next >
Encoding:
Text File  |  1993-09-24  |  1.4 KB  |  29 lines  |  [TEXT/MPS ]

  1. (* Operations on file names *)
  2.  
  3. value current_dir_name : string
  4.         (* The conventional name for the current directory
  5.            (e.g. [.] in Unix). *)
  6.   and concat : string -> string -> string
  7.         (* [concat dir file] returns a file name that designates file
  8.            [file] in directory [dir]. *)
  9.   and 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. *)
  13.   and check_suffix : string -> string -> bool
  14.         (* [check_suffix name suff] returns [true] if the filename [name]
  15.            ends with the suffix [suff]. *)
  16.   and 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]. *)
  20.   and basename : string -> string
  21.   and 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.