[camlp4] add YaM.is_file_empty
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7583 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02master
parent
b63e282dd3
commit
ca789634ba
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue