If flag KeepTerminator is set to KeepTerminator.yes, then the delimiter is included in the strings returned.
The standard error stream.
The standard input stream.
The standard output stream.
Thrown if I/O errors happen.
Used to specify the lock type for File.lock and File.tryLock.
Convenience function that forwards to core.sys.posix.stdio.popen with appropriately-constructed C-style strings.
Iterates through a file a chunk at a time by using foreach.
Experimental network access via the File interface
Reads formatted data from stdin using std._format.formattedRead.
* Read line from stdin. * * This version manages its own read buffer, which means one memory allocation per call. If you are not * retaining a reference to the read data, consider the readln(buf) version, which may offer * better performance as it can reuse its read buffer. * * Returns: * The line that was read, including the line terminator character. * Params: * S = Template parameter; the type of the allocated buffer, and the type returned. Defaults to string. * terminator = Line terminator (by default, '\n'). * Note: * String terminators are not supported due to ambiguity with readln(buf) below. * Throws: * StdioException on I/O error, or UnicodeException on Unicode conversion error. * Example: * Reads stdin and writes it to stdout.
* Read line from stdin and write it to buf[], including terminating character. * * This can be faster than line = readln() because you can reuse * the buffer for each call. Note that reusing the buffer means that you * must copy the previous contents if you wish to retain them. * * Returns: * size_t 0 for end of file, otherwise number of characters read * Params: * buf = Buffer used to store the resulting line data. buf is resized as necessary. * terminator = Line terminator (by default, '\n'). Use std.ascii.newline * for portability (unless the file was opened in text mode). * Throws: * StdioException on I/O error, or UnicodeException on Unicode conversion error. * Example: * Reads stdin and writes it to stdout.
Writes an array or range to a file. Shorthand for data.copy(File(fileName, "wb").lockingBinaryWriter). Similar to std.file.write, strings are written as-is, rather than encoded according to the File's orientation.
Writes its arguments in text format to standard output (without a trailing newline).
Writes formatted data to standard output (without a trailing newline).
Equivalent to writef(fmt, args, '\n').
Equivalent to write(args, '\n'). Calling writeln without arguments is valid and just prints a newline to the standard output.
Encapsulates a FILE*. Generally D does not attempt to provide thin wrappers over equivalent functions in the C standard library, but manipulating FILE* values directly is unsafe and error-prone in many ways. The File type ensures safe manipulation, automatic file closing, and a lot of convenience.
Iterates through the lines of a file by using foreach.
Indicates whether T is a file handle, i.e. the type is implicitly convertable to File or a pointer to a core.stdc.stdio.FILE.
Standard I/O functions that extend core.stdc.stdio. core.stdc.stdio is publically imported when importing std.stdio.
There are three layers of I/O: