diff --git a/wit-0.3.0-draft/types.wit b/wit-0.3.0-draft/types.wit index 3fafe57..05b02fb 100644 --- a/wit-0.3.0-draft/types.wit +++ b/wit-0.3.0-draft/types.wit @@ -411,8 +411,11 @@ 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. + /// + /// This function returns a future, which will resolve to an error code if + /// reading full contents of the directory fails. @since(version = 0.3.0) - read-directory: func() -> result; + read-directory: func() -> tuple, future>>; /// Synchronize the data and metadata of a file to disk. /// @@ -619,12 +622,4 @@ interface types { path: string, ) -> result; } - - /// A stream of directory entries. - @since(version = 0.3.0) - resource directory-entry-stream { - /// Read a single directory entry from a `directory-entry-stream`. - @since(version = 0.3.0) - read-directory-entry: func() -> result, error-code>; - } }