readProcFile

fnstring readProcFile(string path) @safe nothrow

Reads a /proc file and returns its content.

This is a helper function for reading /proc files safely.

Parameters

pathPath to the /proc file.

Returns

File content as a string, or empty string if file doesn't exist.

Example:

auto content = readProcFile("/proc/stat");