Reference · Rules and helpers · rules.rs
save_result Function
folder/name.ext, or folder/name 2.ext, … when that is taken. Writes the file and returns its path.
func saveResult(folder: String, name: String, ext: String, bytes: Data) throws -> Stringpublic static string SaveResult(string folder, string name, string ext, byte[] bytes)pub fn save_result(folder: String, name: String, ext: String, bytes: Vec<u8>) -> Result<String, PagewerkError>Parameters
| Name | Type | Swift / C# |
|---|---|---|
folder | String | folder |
name | String | name |
ext | String | ext |
bytes | Vec<u8> | bytes |
Returns
String
Errors
Throws PagewerkError:
Unreadable: “unreadable: {message}”Refused: “refused: {message}”WrongPassword: “wrong password”
Signatures are generated from the engine’s code. Swift is checked against the generated bindings; C# follows the bindings generator’s naming rules.