Quantcast
Channel: How to redirect output to file if no console detected in Nim - Stack Overflow
Viewing all articles
Browse latest Browse all 4

How to redirect output to file if no console detected in Nim

$
0
0

I want my Nim program to write to the console if there is one, and redirect echo to write to a file if there isn't. Is there an equivalent to the Environment.UserInteractive property in .NET which I could use to detect if no console is available and redirect stdout in that case?


Viewing all articles
Browse latest Browse all 4

Latest Images

Trending Articles





Latest Images