Skip to content

Commit

Permalink
Remove allocate. (#64)
Browse files Browse the repository at this point in the history
* Remove `allocate`.

There does not appear to be a way to implement `allocate` in a non-racy
way on Windows or macOS.

Fixes #19.

* Update wasi-filesystem.abi.md.
  • Loading branch information
sunfishcode authored Oct 19, 2022
1 parent fe61c77 commit 8b823a6
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 29 deletions.
16 changes: 0 additions & 16 deletions wasi-filesystem.abi.md
Original file line number Diff line number Diff line change
Expand Up @@ -666,22 +666,6 @@ Size: 16, Alignment: 8

----

#### <a href="#descriptor_fallocate" name="descriptor_fallocate"></a> `descriptor::fallocate`

Force the allocation of space in a file.

Note: This is similar to `posix_fallocate` in POSIX.
##### Params

- <a href="#descriptor_fallocate.self" name="descriptor_fallocate.self"></a> `self`: handle<descriptor>
- <a href="#descriptor_fallocate.offset" name="descriptor_fallocate.offset"></a> `offset`: [`filesize`](#filesize)
- <a href="#descriptor_fallocate.len" name="descriptor_fallocate.len"></a> `len`: [`filesize`](#filesize)
##### Results

- result<_, [`errno`](#errno)>

----

#### <a href="#descriptor_datasync" name="descriptor_datasync"></a> `descriptor::datasync`

Synchronize the data of a file to disk.
Expand Down
13 changes: 0 additions & 13 deletions wasi-filesystem.wit.md
Original file line number Diff line number Diff line change
Expand Up @@ -421,19 +421,6 @@ fadvise: func(
) -> result<_, errno>
```

## `fallocate`
```wit
/// Force the allocation of space in a file.
///
/// Note: This is similar to `posix_fallocate` in POSIX.
fallocate: func(
/// The offset at which to start the allocation.
offset: filesize,
/// The length of the area that is allocated.
len: filesize
) -> result<_, errno>
```

## `fdatasync`
```wit
/// Synchronize the data of a file to disk.
Expand Down

0 comments on commit 8b823a6

Please sign in to comment.