diff --git a/src/Vm.sol b/src/Vm.sol index 378227e3..fa375db0 100644 --- a/src/Vm.sol +++ b/src/Vm.sol @@ -119,6 +119,8 @@ 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) @@ -126,6 +128,9 @@ interface Vm { // 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;