@@ -177,7 +177,7 @@ pub fn read(from filepath: String) -> Result(String, FileError) {
177
177
/// Write a string to a file at the given path
178
178
/// ## Example
179
179
/// ```gleam
180
- /// let assert Ok(Nil) = write("Hello, World!", to: "./hello_world.txt")
180
+ /// let assert Ok(Nil) = write(to: "./hello_world.txt", contents: "Hello, World! ")
181
181
/// ```
182
182
///
183
183
pub fn write (
@@ -221,7 +221,7 @@ pub fn delete_all(paths paths: List(String)) -> Result(Nil, FileError) {
221
221
/// Append a string to the contents of a file at the given path
222
222
/// ## Example
223
223
/// ```gleam
224
- /// let assert Ok(Nil) = append("more text", to: "./needs_more_text.txt")
224
+ /// let assert Ok(Nil) = append(to: "./needs_more_text.txt", contents: "more text ")
225
225
/// ```
226
226
///
227
227
pub fn append (
@@ -246,7 +246,7 @@ pub fn read_bits(from filepath: String) -> Result(BitArray, FileError) {
246
246
/// Write a bitstring to a file at the given path
247
247
/// ## Example
248
248
/// ```gleam
249
- /// let assert Ok(Nil) = write_bits(<<"Hello, World!":utf8>>, to: "./hello_world.txt" )
249
+ /// let assert Ok(Nil) = write_bits(to: "./hello_world.txt", bits: <<"Hello, World!":utf8>>)
250
250
/// ```
251
251
///
252
252
pub fn write_bits (
@@ -260,7 +260,7 @@ pub fn write_bits(
260
260
/// Append a bitstring to the contents of a file at the given path
261
261
/// ## Example
262
262
/// ```gleam
263
- /// let assert Ok(Nil) = append_bits(<<"more text":utf8>>, to: "./needs_more_text.txt" )
263
+ /// let assert Ok(Nil) = append_bits(to: "./needs_more_text.txt", bits: <<"more text":utf8>>)
264
264
/// ```
265
265
///
266
266
pub fn append_bits (
0 commit comments