[camlp4] add YaM.is_file_empty

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7583 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Nicolas Pouillard 2006-09-08 12:49:30 +00:00
parent b63e282dd3
commit ca789634ba
2 changed files with 8 additions and 0 deletions

View File

@ -880,3 +880,9 @@ let scall cmd =
let str = input_line cin in str
let which x = scall ("which"^^x)
let is_file_empty f =
let i = open_in f in
let res = in_channel_length i < 1 in
close_in i; res

View File

@ -302,3 +302,5 @@ val best: (string * string) list -> string
val getenv: string -> string -> string
val which : string -> string
val is_file_empty : string -> bool