nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
ci: tests for macOS on Gitlab CI
[nit.git]
/
lib
/
core
/
file.nit
diff --git
a/lib/core/file.nit
b/lib/core/file.nit
index
fa50549
..
ed4c6c8
100644
(file)
--- a/
lib/core/file.nit
+++ b/
lib/core/file.nit
@@
-306,6
+306,9
@@
redef class Int
private fun fd_to_stream(mode: CString): NativeFile `{
return fdopen((int)self, mode);
`}
+
+ # Does the file descriptor `self` refer to a terminal?
+ fun isatty: Bool `{ return isatty(self); `}
end
# Constant for read-only file streams