Standard I/O functions that extend $(B std.c.stdio). $(B std.c.stdio)
is $(D_PARAM public)ally imported when importing $(B std.stdio).
Source: $(PHOBOSSRC std/_stdio.d)
Macros:
WIKI=Phobos/StdStdio
Copyright: Copyright Digital Mars 2007-.
License: $(WEB boost.org/LICENSE_1_0.txt, Boost License 1.0).
Authors: $(WEB digitalmars.com, Walter Bright),
$(WEB erdani.org, Andrei Alexandrescu),
Alex Rønne Petersen
Encapsulates a $(D FILE*). Generally D does not attempt to provide thin wrappers over equivalent functions in the C standard library, but manipulating $(D FILE*) values directly is unsafe and error-prone in many ways. The $(D File) type ensures safe manipulation, automatic file closing, and a lot of convenience.
Indicates whether $(D T) is a file handle of some kind.
$(RED Scheduled for deprecation in January 2013. Please use $(D isFileHandle) instead.)
For each argument $(D arg) in $(D args), format the argument (as per $(LINK2 std_conv.html, to!(string)(arg))) and write the resulting string to $(D args[0]). A call without any arguments will fail to compile.
Equivalent to $(D write(args, '\n')). Calling $(D writeln) without arguments is valid and just prints a newline to the standard output.
If the first argument $(D args[0]) is a $(D FILE*), use $(LINK2 std_format.html#format-string, the format specifier) in $(D args[1]) to control the formatting of $(D args[2..$]), and write the resulting string to $(D args[0]). If $(D arg[0]) is not a $(D FILE*), the call is equivalent to $(D writef(stdout, args)).
Equivalent to $(D writef(args, '\n')).
Read data from $(D stdin) according to the specified $(LINK2 std_format.html#format-string, format specifier) using $(XREF format,formattedRead).
Read line from stream $(D fp). Returns: $(D null) for end of file, $(D char[]) for line read from $(D fp), including terminating character Params: $(D fp) = input stream $(D terminator) = line terminator, '\n' by default Throws: $(D StdioException) on error Example: Reads $(D stdin) and writes it to $(D stdout). --- import std.stdio;
Read line from stream $(D fp). Returns: $(D null) for end of file, $(D char[]) for line read from $(D fp), including terminating character Params: $(D fp) = input stream $(D terminator) = line terminator, '\n' by default Throws: $(D StdioException) on error Example: Reads $(D stdin) and writes it to $(D stdout). --- import std.stdio;
Convenience function that forwards to $(D std.c.stdio.popen) with appropriately-constructed C-style strings.
Iterates through the lines of a file by using $(D foreach).
Iterates through a file a chunk at a time by using $(D foreach).
Thrown if I/O errors happen.
The standard input stream.
The standard output stream.
The standard error stream.
Experimental network access via the File interface