Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
oleiade committed Sep 6, 2023
1 parent 6239c98 commit cd508e5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions examples/experimental/fs/fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,9 @@ export default async function () {

// Seek back to the beginning of the file
await file.seek(0, SeekMode.Start);

if (condition) {
// Seek to the end of the file
await file.close();
}
}
1 change: 1 addition & 0 deletions js/modules/k6/experimental/fs/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ func (fr *cache) open(filename string, fromFs afero.Fs) ([]byte, error) {
// However, as per #1079, we plan to eventually reduce our dependency on afero, and
// expect this issue to be resolved at that point.
// TODO: re-evaluate opening from the FS this once #1079 is resolved.
// FIXME: we need to close the file, can we do it at the end of test (using the event loop)?
f, err := fromFs.Open(filename)
if err != nil {
return nil, err
Expand Down

0 comments on commit cd508e5

Please sign in to comment.