diff --git a/imports.md b/imports.md
index e3eb75b..41d59a6 100644
--- a/imports.md
+++ b/imports.md
@@ -901,7 +901,6 @@ file and they do not interfere with each other.
Params
Return values
@@ -916,7 +915,6 @@ POSIX.
Params
Return values
@@ -931,7 +929,6 @@ POSIX.
Params
Return values
@@ -943,7 +940,6 @@ POSIX.
Params
self
: borrow<descriptor
>
-this
: own<descriptor
>
offset
: filesize
length
: filesize
advice
: advice
@@ -960,7 +956,6 @@ opened for writing.
Params
Return values
@@ -974,7 +969,6 @@ from fdstat_get
in earlier versions of WASI.
Params
Return values
@@ -991,7 +985,6 @@ from fdstat_get
in earlier versions of WASI.
Params
Return values
@@ -1004,7 +997,6 @@ extra bytes are filled with zeros.
Params
Return values
@@ -1018,7 +1010,6 @@ extra bytes are filled with zeros.
Params
@@ -1038,7 +1029,6 @@ if the I/O operation is interrupted.
Params
@@ -1056,7 +1046,6 @@ the write set to zero.
Params
@@ -1075,7 +1064,6 @@ do not interfere with each other.
Params
Return values
@@ -1089,7 +1077,6 @@ opened for writing.
Params
Return values
@@ -1101,7 +1088,6 @@ opened for writing.
Params
Return values
@@ -1119,7 +1105,6 @@ modified, use metadata-hash
.
Params
Return values
@@ -1134,7 +1119,6 @@ discussion of alternatives.
Params
@@ -1150,7 +1134,6 @@ WASI.
Params
@@ -1276,7 +1253,6 @@ entities.
Params
self
: borrow<descriptor
>
-this
: own<descriptor
>
path-flags
: path-flags
path
: string
type
: access-type
@@ -1292,7 +1268,6 @@ Note: This is similar to unlinkat(fd, path, 0)
in POSIX.
Params
Return values
@@ -1307,7 +1282,6 @@ filesystem-specific.
Params
self
: borrow<descriptor
>
-this
: own<descriptor
>
path-flags
: path-flags
path
: string
modes
: modes
@@ -1327,7 +1301,6 @@ flag. read
on a directory implies readability and searchability, an
Params
Return values
Return values
Return values
Return values
Return values
@@ -1455,7 +1423,6 @@ may be used instead.
Params
Return values
@@ -1483,7 +1450,6 @@ computed hash.
Params
Return values
@@ -1496,7 +1462,6 @@ to by a directory descriptor and a relative path.
Params
diff --git a/wit/types.wit b/wit/types.wit
index d3d2dcb..0897cfb 100644
--- a/wit/types.wit
+++ b/wit/types.wit
@@ -313,7 +313,6 @@ interface types {
///
/// Note: This allows using `read-stream`, which is similar to `read` in POSIX.
read-via-stream: func(
- this: descriptor,
/// The offset within the file at which to start reading.
offset: filesize,
) -> result
@@ -325,7 +324,6 @@ interface types {
/// Note: This allows using `write-stream`, which is similar to `write` in
/// POSIX.
write-via-stream: func(
- this: descriptor,
/// The offset within the file at which to start writing.
offset: filesize,
) -> result
@@ -336,15 +334,12 @@ interface types {
///
/// Note: This allows using `write-stream`, which is similar to `write` with
/// `O_APPEND` in in POSIX.
- append-via-stream: func(
- this: descriptor,
- ) -> result
+ append-via-stream: func() -> result
/// Provide file advisory information on a descriptor.
///
/// This is similar to `posix_fadvise` in POSIX.
advise: func(
- this: descriptor,
/// The offset within the file to which the advisory applies.
offset: filesize,
/// The length of the region to which the advisory applies.
@@ -359,7 +354,7 @@ interface types {
/// opened for writing.
///
/// Note: This is similar to `fdatasync` in POSIX.
- sync-data: func(this: descriptor) -> result<_, error-code>
+ sync-data: func() -> result<_, error-code>
/// Get flags associated with a descriptor.
///
@@ -367,7 +362,7 @@ interface types {
///
/// Note: This returns the value that was the `fs_flags` value returned
/// from `fdstat_get` in earlier versions of WASI.
- get-flags: func(this: descriptor) -> result
+ get-flags: func() -> result
/// Get the dynamic type of a descriptor.
///
@@ -379,13 +374,13 @@ interface types {
///
/// Note: This returns the value that was the `fs_filetype` value returned
/// from `fdstat_get` in earlier versions of WASI.
- get-type: func(this: descriptor) -> result
+ get-type: func() -> result
/// Adjust the size of an open file. If this increases the file's size, the
/// extra bytes are filled with zeros.
///
/// Note: This was called `fd_filestat_set_size` in earlier versions of WASI.
- set-size: func(this: descriptor, size: filesize) -> result<_, error-code>
+ set-size: func(size: filesize) -> result<_, error-code>
/// Adjust the timestamps of an open file or directory.
///
@@ -393,7 +388,6 @@ interface types {
///
/// Note: This was called `fd_filestat_set_times` in earlier versions of WASI.
set-times: func(
- this: descriptor,
/// The desired values of the data access timestamp.
data-access-timestamp: new-timestamp,
/// The desired values of the data modification timestamp.
@@ -412,7 +406,6 @@ interface types {
///
/// Note: This is similar to `pread` in POSIX.
read: func(
- this: descriptor,
/// The maximum number of bytes to read.
length: filesize,
/// The offset within the file at which to read.
@@ -429,7 +422,6 @@ interface types {
///
/// Note: This is similar to `pwrite` in POSIX.
write: func(
- this: descriptor,
/// Data to write
buffer: list,
/// The offset within the file at which to write.
@@ -445,9 +437,7 @@ interface types {
/// This always returns a new stream which starts at the beginning of the
/// directory. Multiple streams may be active on the same directory, and they
/// do not interfere with each other.
- read-directory: func(
- this: descriptor
- ) -> result
+ read-directory: func() -> result
/// Synchronize the data and metadata of a file to disk.
///
@@ -455,13 +445,12 @@ interface types {
/// opened for writing.
///
/// Note: This is similar to `fsync` in POSIX.
- sync: func(this: descriptor) -> result<_, error-code>
+ sync: func() -> result<_, error-code>
/// Create a directory.
///
/// Note: This is similar to `mkdirat` in POSIX.
create-directory-at: func(
- this: descriptor,
/// The relative path at which to create the directory.
path: string,
) -> result<_, error-code>
@@ -475,7 +464,7 @@ interface types {
/// modified, use `metadata-hash`.
///
/// Note: This was called `fd_filestat_get` in earlier versions of WASI.
- stat: func(this: descriptor) -> result
+ stat: func() -> result
/// Return the attributes of a file or directory.
///
@@ -485,7 +474,6 @@ interface types {
///
/// Note: This was called `path_filestat_get` in earlier versions of WASI.
stat-at: func(
- this: descriptor,
/// Flags determining the method of how the path is resolved.
path-flags: path-flags,
/// The relative path of the file or directory to inspect.
@@ -499,7 +487,6 @@ interface types {
/// Note: This was called `path_filestat_set_times` in earlier versions of
/// WASI.
set-times-at: func(
- this: descriptor,
/// Flags determining the method of how the path is resolved.
path-flags: path-flags,
/// The relative path of the file or directory to operate on.
@@ -514,7 +501,6 @@ interface types {
///
/// Note: This is similar to `linkat` in POSIX.
link-at: func(
- this: descriptor,
/// Flags determining the method of how the path is resolved.
old-path-flags: path-flags,
/// The relative source path from which to link.
@@ -544,7 +530,6 @@ interface types {
///
/// Note: This is similar to `openat` in POSIX.
open-at: func(
- this: descriptor,
/// Flags determining the method of how the path is resolved.
path-flags: path-flags,
/// The relative path of the object to open.
@@ -564,7 +549,6 @@ interface types {
///
/// Note: This is similar to `readlinkat` in POSIX.
readlink-at: func(
- this: descriptor,
/// The relative path of the symbolic link from which to read.
path: string,
) -> result
@@ -575,7 +559,6 @@ interface types {
///
/// Note: This is similar to `unlinkat(fd, path, AT_REMOVEDIR)` in POSIX.
remove-directory-at: func(
- this: descriptor,
/// The relative path to a directory to remove.
path: string,
) -> result<_, error-code>
@@ -584,7 +567,6 @@ interface types {
///
/// Note: This is similar to `renameat` in POSIX.
rename-at: func(
- this: descriptor,
/// The relative source path of the file or directory to rename.
old-path: string,
/// The base directory for `new-path`.
@@ -600,7 +582,6 @@ interface types {
///
/// Note: This is similar to `symlinkat` in POSIX.
symlink-at: func(
- this: descriptor,
/// The contents of the symbolic link.
old-path: string,
/// The relative destination path at which to create the symbolic link.
@@ -618,7 +599,6 @@ interface types {
///
/// Note: This is similar to `faccessat` with the `AT_EACCESS` flag in POSIX.
access-at: func(
- this: descriptor,
/// Flags determining the method of how the path is resolved.
path-flags: path-flags,
/// The relative path to check.
@@ -632,7 +612,6 @@ interface types {
/// Return `error-code::is-directory` if the path refers to a directory.
/// Note: This is similar to `unlinkat(fd, path, 0)` in POSIX.
unlink-file-at: func(
- this: descriptor,
/// The relative path to a file to unlink.
path: string,
) -> result<_, error-code>
@@ -644,7 +623,6 @@ interface types {
///
/// Note: This is similar to `fchmodat` in POSIX.
change-file-permissions-at: func(
- this: descriptor,
/// Flags determining the method of how the path is resolved.
path-flags: path-flags,
/// The relative path to operate on.
@@ -664,7 +642,6 @@ interface types {
///
/// Note: This is similar to `fchmodat` in POSIX.
change-directory-permissions-at: func(
- this: descriptor,
/// Flags determining the method of how the path is resolved.
path-flags: path-flags,
/// The relative path to operate on.
@@ -693,7 +670,7 @@ interface types {
/// locking, this function returns `error-code::unsupported`.
///
/// Note: This is similar to `flock(fd, LOCK_SH)` in Unix.
- lock-shared: func(this: descriptor) -> result<_, error-code>
+ lock-shared: func() -> result<_, error-code>
/// Request an exclusive advisory lock for an open file.
///
@@ -717,7 +694,7 @@ interface types {
/// locking, this function returns `error-code::unsupported`.
///
/// Note: This is similar to `flock(fd, LOCK_EX)` in Unix.
- lock-exclusive: func(this: descriptor) -> result<_, error-code>
+ lock-exclusive: func() -> result<_, error-code>
/// Request a shared advisory lock for an open file.
///
@@ -740,7 +717,7 @@ interface types {
/// locking, this function returns `error-code::unsupported`.
///
/// Note: This is similar to `flock(fd, LOCK_SH | LOCK_NB)` in Unix.
- try-lock-shared: func(this: descriptor) -> result<_, error-code>
+ try-lock-shared: func() -> result<_, error-code>
/// Request an exclusive advisory lock for an open file.
///
@@ -765,12 +742,12 @@ interface types {
/// locking, this function returns `error-code::unsupported`.
///
/// Note: This is similar to `flock(fd, LOCK_EX | LOCK_NB)` in Unix.
- try-lock-exclusive: func(this: descriptor) -> result<_, error-code>
+ try-lock-exclusive: func() -> result<_, error-code>
/// Release a shared or exclusive lock on an open file.
///
/// Note: This is similar to `flock(fd, LOCK_UN)` in Unix.
- unlock: func(this: descriptor) -> result<_, error-code>
+ unlock: func() -> result<_, error-code>
/// Test whether two descriptors refer to the same filesystem object.
///
@@ -778,7 +755,7 @@ interface types {
/// same device (`st_dev`) and inode (`st_ino` or `d_ino`) numbers.
/// wasi-filesystem does not expose device and inode numbers, so this function
/// may be used instead.
- is-same-object: func(this: descriptor, other: descriptor) -> bool
+ is-same-object: func(other: descriptor) -> bool
/// Return a hash of the metadata associated with a filesystem object referred
/// to by a descriptor.
@@ -799,16 +776,13 @@ interface types {
/// computed hash.
///
/// However, none of these is required.
- metadata-hash: func(
- this: descriptor,
- ) -> result
+ metadata-hash: func() -> result
/// Return a hash of the metadata associated with a filesystem object referred
/// to by a directory descriptor and a relative path.
///
/// This performs the same hash computation as `metadata-hash`.
metadata-hash-at: func(
- this: descriptor,
/// Flags determining the method of how the path is resolved.
path-flags: path-flags,
/// The relative path of the file or directory to inspect.