summaryrefslogtreecommitdiffstats
path: root/otherlibs/win32unix/unix.ml
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@inria.fr>2006-09-21 13:57:34 +0000
committerXavier Leroy <xavier.leroy@inria.fr>2006-09-21 13:57:34 +0000
commit366af60a746782584a94c8a39bae25fadb28a9de (patch)
tree612f14df6ae900fa88471b7873e803c728d96398 /otherlibs/win32unix/unix.ml
parent0b1b6eb0c62bb06b6e7e6b1222a3f9186dbc11ee (diff)
Ajout de Unix.fstat et Unix.isatty
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7633 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'otherlibs/win32unix/unix.ml')
-rw-r--r--otherlibs/win32unix/unix.ml6
1 files changed, 4 insertions, 2 deletions
diff --git a/otherlibs/win32unix/unix.ml b/otherlibs/win32unix/unix.ml
index ee7d6456e..acb12d695 100644
--- a/otherlibs/win32unix/unix.ml
+++ b/otherlibs/win32unix/unix.ml
@@ -242,7 +242,9 @@ type stats =
external stat : string -> stats = "unix_stat"
let lstat = stat
-let fstat fd = invalid_arg "Unix.fstat not implemented"
+external fstat : file_descr -> stats = "unix_fstat"
+let isatty fd =
+ match (fstat fd).st_kind with S_CHR -> true | _ -> false
(* Operations on file names *)
@@ -273,7 +275,7 @@ module LargeFile =
}
external stat : string -> stats = "unix_stat_64"
let lstat = stat
- let fstat fd = invalid_arg "Unix.LargeFile.fstat not implemented"
+ external fstat : file_descr -> stats = "unix_fstat_64"
end
(* File permissions and ownership *)