io.file.stream

Public Imports

io.file.flags
public import io.file.flags;

Members

Aliases

File
alias File = RefCounted!(StreamShim!(FixedBufferBase!FileBase), RefCountedAutoInitialize.no)
Undocumented in source.
SysException
alias SysException = ErrnoException
Undocumented in source.
UnbufferedFile
alias UnbufferedFile = RefCounted!(StreamShim!FileBase, RefCountedAutoInitialize.no)
Undocumented in source.

Classes

SysException
class SysException
Undocumented in source.

Enums

DUPLICATE_CLOSE_SOURCE
anonymousenum DUPLICATE_CLOSE_SOURCE
Undocumented in source but is binding to Windows. You might be able to learn more by searching the web for its name.
FILE_TYPE_UNKNOWN
anonymousenum FILE_TYPE_UNKNOWN
Undocumented in source but is binding to Windows. You might be able to learn more by searching the web for its name.
SEEK_SET
anonymousenum SEEK_SET
Undocumented in source.

Functions

FlushFileBuffers
BOOL FlushFileBuffers(HANDLE hFile)
Undocumented in source but is binding to Windows. You might be able to learn more by searching the web for its name.
GetFileSizeEx
BOOL GetFileSizeEx(HANDLE hFile, long* lpFileSize)
Undocumented in source but is binding to Windows. You might be able to learn more by searching the web for its name.
GetFileType
DWORD GetFileType(HANDLE hFile)
Undocumented in source but is binding to Windows. You might be able to learn more by searching the web for its name.
SetFilePointerEx
BOOL SetFilePointerEx(HANDLE hFile, long liDistanceToMove, long* lpNewFilePointer, DWORD dwMoveMethod)
Undocumented in source but is binding to Windows. You might be able to learn more by searching the web for its name.
sendfile
ssize_t sendfile(int out_fd, int in_fd, off_t* offset, size_t count)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
sysEnforce
T sysEnforce(T value, string msg)
Undocumented in source. Be warned that the author may not have intended to support it.
testFile
auto testFile(string file, size_t line)

Generates a file name for testing and attempts to delete it on destruction.

Structs

FileBase
struct FileBase

A cross-platform wrapper around low-level file operations.

Meta

Authors

Jason White

Description: This module provides a low-level file stream class.

Synopsis:

// Open a new file in read/write mode. Throws an exception if the file exists.
auto f = File("myfile", FileFlags.readWriteNew);

// Write an arbitrary array to the stream.
f.write("Hello world!");

// Seek to the beginning.
f.position = 0;

// Read in 5 bytes.
char buf[5];
f.read(buf);
assert(buf == "Hello");