Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/Vm.sol
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,18 @@ interface Vm {

// Reads the entire content of file to string, (path) => (data)
function readFile(string calldata) external returns (string memory);
// Reads the entire content of file as binary. Path is relative to the project root. (path) => (data)
function readFileBinary(string calldata) external returns (bytes memory);
// Get the path of the current project root
function projectRoot() external returns (string memory);
// Reads next line of file to string, (path) => (line)
function readLine(string calldata) external returns (string memory);
// Writes data to file, creating a file if it does not exist, and entirely replacing its contents if it does.
// (path, data) => ()
function writeFile(string calldata, string calldata) external;
// Writes binary data to a file, creating a file if it does not exist, and entirely replacing its contents if it does.
// Path is relative to the project root. (path, data) => ()
function writeFileBinary(string calldata, bytes calldata) external;
// Writes line to file, creating a file if it does not exist.
// (path, data) => ()
function writeLine(string calldata, string calldata) external;
Expand Down