X-Git-Url: http://nitlanguage.org diff --git a/lib/core/file.nit b/lib/core/file.nit index 26f7398..261dc7d 100644 --- 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