Skip to content

Commit 809a204

Browse files
committed
Rename option types for readFileStream and writeFileStream.
1 parent 74a69fe commit 809a204

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

src/FileSystem.gren

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ effect module FileSystem where { subscription = FileSystemSub } exposing
3434
, appendToFile
3535
, copyFile
3636
, readFile
37-
, ReadFileStreamPosition (..)
37+
, ReadFileStreamMode (..)
3838
, readFileStream
3939
, writeFile
40-
, WriteFileStreamBehaviour (..)
40+
, WriteFileStreamMode (..)
4141
, writeFileStream
4242
, truncateFile
4343
, remove
@@ -447,15 +447,15 @@ readFile _ path =
447447
* `From` skips the associated number of bytes, then streams the rest of the file
448448
* `Between` reads just the bytes between `start` and `end`, both of which are offsets from the beginning of the file.
449449
-}
450-
type ReadFileStreamPosition
450+
type ReadFileStreamMode
451451
= Beginning
452452
| From Int
453453
| Between { start : Int, end : Int }
454454

455455

456456
{-| Read the contents of a file as a stream.
457457
-}
458-
readFileStream : Permission -> ReadFileStreamPosition -> Path -> Task Error (Stream.Readable Bytes)
458+
readFileStream : Permission -> ReadFileStreamMode -> Path -> Task Error (Stream.Readable Bytes)
459459
readFileStream _ position path =
460460
let
461461
range =
@@ -486,15 +486,15 @@ writeFile _ bytes path =
486486
* `ReplaceFrom` will keep the associated number of bytes already in the file, but replace everything after with the streamed data.
487487
* `Append` will keep the contents of the file untouched, and add new data at the end.
488488
-}
489-
type WriteFileStreamBehaviour
489+
type WriteFileStreamMode
490490
= Replace
491491
| ReplaceFrom Int
492492
| Append
493493

494494

495495
{-| Create a writable stream backed by a file.
496496
-}
497-
writeFileStream : Permission -> WriteFileStreamBehaviour -> Path -> Task Error (Stream.Writable Bytes)
497+
writeFileStream : Permission -> WriteFileStreamMode -> Path -> Task Error (Stream.Writable Bytes)
498498
writeFileStream _ behaviour path =
499499
let
500500
pos =

0 commit comments

Comments
 (0)