Skip to content

Commit 977377b

Browse files
author
Pat Hickey
authored
Merge pull request #139 from WebAssembly/pch/remove_modes
Remove modes from Preview 2 spec
2 parents e3c3f33 + d9e728e commit 977377b

File tree

2 files changed

+0
-167
lines changed

2 files changed

+0
-167
lines changed

imports.md

Lines changed: 0 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -569,40 +569,6 @@ expanded.
569569
<p>Truncate file to size 0, similar to `O_TRUNC` in POSIX.
570570
</li>
571571
</ul>
572-
<h4><a name="modes"><code>flags modes</code></a></h4>
573-
<p>Permissions mode used by <code>open-at</code>, <code>change-file-permissions-at</code>, and
574-
similar.</p>
575-
<h5>Flags members</h5>
576-
<ul>
577-
<li>
578-
<p><a name="modes.readable"><code>readable</code></a>: </p>
579-
<p>True if the resource is considered readable by the containing
580-
filesystem.
581-
</li>
582-
<li>
583-
<p><a name="modes.writable"><code>writable</code></a>: </p>
584-
<p>True if the resource is considered writable by the containing
585-
filesystem.
586-
</li>
587-
<li>
588-
<p><a name="modes.executable"><code>executable</code></a>: </p>
589-
<p>True if the resource is considered executable by the containing
590-
filesystem. This does not apply to directories.
591-
</li>
592-
</ul>
593-
<h4><a name="access_type"><code>variant access-type</code></a></h4>
594-
<p>Access type used by <code>access-at</code>.</p>
595-
<h5>Variant Cases</h5>
596-
<ul>
597-
<li>
598-
<p><a name="access_type.access"><code>access</code></a>: <a href="#modes"><a href="#modes"><code>modes</code></a></a></p>
599-
<p>Test for readability, writeability, or executability.
600-
</li>
601-
<li>
602-
<p><a name="access_type.exists"><code>exists</code></a></p>
603-
<p>Test whether the path exists.
604-
</li>
605-
</ul>
606572
<h4><a name="link_count"><code>type link-count</code></a></h4>
607573
<p><code>u64</code></p>
608574
<p>Number of hard links to an inode.
@@ -1171,7 +1137,6 @@ contains <code>truncate</code> or <code>create</code>, and the base descriptor d
11711137
<li><a name="method_descriptor.open_at.path"><code>path</code></a>: <code>string</code></li>
11721138
<li><a name="method_descriptor.open_at.open_flags"><a href="#open_flags"><code>open-flags</code></a></a>: <a href="#open_flags"><a href="#open_flags"><code>open-flags</code></a></a></li>
11731139
<li><a name="method_descriptor.open_at.flags"><code>flags</code></a>: <a href="#descriptor_flags"><a href="#descriptor_flags"><code>descriptor-flags</code></a></a></li>
1174-
<li><a name="method_descriptor.open_at.modes"><a href="#modes"><code>modes</code></a></a>: <a href="#modes"><a href="#modes"><code>modes</code></a></a></li>
11751140
</ul>
11761141
<h5>Return values</h5>
11771142
<ul>
@@ -1233,25 +1198,6 @@ filesystem, this function fails with <a href="#error_code.not_permitted"><code>e
12331198
<ul>
12341199
<li><a name="method_descriptor.symlink_at.0"></a> result&lt;_, <a href="#error_code"><a href="#error_code"><code>error-code</code></a></a>&gt;</li>
12351200
</ul>
1236-
<h4><a name="method_descriptor.access_at"><code>[method]descriptor.access-at: func</code></a></h4>
1237-
<p>Check accessibility of a filesystem path.</p>
1238-
<p>Check whether the given filesystem path names an object which is
1239-
readable, writable, or executable, or whether it exists.</p>
1240-
<p>This does not a guarantee that subsequent accesses will succeed, as
1241-
filesystem permissions may be modified asynchronously by external
1242-
entities.</p>
1243-
<p>Note: This is similar to <code>faccessat</code> with the <code>AT_EACCESS</code> flag in POSIX.</p>
1244-
<h5>Params</h5>
1245-
<ul>
1246-
<li><a name="method_descriptor.access_at.self"><code>self</code></a>: borrow&lt;<a href="#descriptor"><a href="#descriptor"><code>descriptor</code></a></a>&gt;</li>
1247-
<li><a name="method_descriptor.access_at.path_flags"><a href="#path_flags"><code>path-flags</code></a></a>: <a href="#path_flags"><a href="#path_flags"><code>path-flags</code></a></a></li>
1248-
<li><a name="method_descriptor.access_at.path"><code>path</code></a>: <code>string</code></li>
1249-
<li><a name="method_descriptor.access_at.type"><code>type</code></a>: <a href="#access_type"><a href="#access_type"><code>access-type</code></a></a></li>
1250-
</ul>
1251-
<h5>Return values</h5>
1252-
<ul>
1253-
<li><a name="method_descriptor.access_at.0"></a> result&lt;_, <a href="#error_code"><a href="#error_code"><code>error-code</code></a></a>&gt;</li>
1254-
</ul>
12551201
<h4><a name="method_descriptor.unlink_file_at"><code>[method]descriptor.unlink-file-at: func</code></a></h4>
12561202
<p>Unlink a filesystem object that is not a directory.</p>
12571203
<p>Return <a href="#error_code.is_directory"><code>error-code::is-directory</code></a> if the path refers to a directory.
@@ -1265,41 +1211,6 @@ Note: This is similar to <code>unlinkat(fd, path, 0)</code> in POSIX.</p>
12651211
<ul>
12661212
<li><a name="method_descriptor.unlink_file_at.0"></a> result&lt;_, <a href="#error_code"><a href="#error_code"><code>error-code</code></a></a>&gt;</li>
12671213
</ul>
1268-
<h4><a name="method_descriptor.change_file_permissions_at"><code>[method]descriptor.change-file-permissions-at: func</code></a></h4>
1269-
<p>Change the permissions of a filesystem object that is not a directory.</p>
1270-
<p>Note that the ultimate meanings of these permissions is
1271-
filesystem-specific.</p>
1272-
<p>Note: This is similar to <code>fchmodat</code> in POSIX.</p>
1273-
<h5>Params</h5>
1274-
<ul>
1275-
<li><a name="method_descriptor.change_file_permissions_at.self"><code>self</code></a>: borrow&lt;<a href="#descriptor"><a href="#descriptor"><code>descriptor</code></a></a>&gt;</li>
1276-
<li><a name="method_descriptor.change_file_permissions_at.path_flags"><a href="#path_flags"><code>path-flags</code></a></a>: <a href="#path_flags"><a href="#path_flags"><code>path-flags</code></a></a></li>
1277-
<li><a name="method_descriptor.change_file_permissions_at.path"><code>path</code></a>: <code>string</code></li>
1278-
<li><a name="method_descriptor.change_file_permissions_at.modes"><a href="#modes"><code>modes</code></a></a>: <a href="#modes"><a href="#modes"><code>modes</code></a></a></li>
1279-
</ul>
1280-
<h5>Return values</h5>
1281-
<ul>
1282-
<li><a name="method_descriptor.change_file_permissions_at.0"></a> result&lt;_, <a href="#error_code"><a href="#error_code"><code>error-code</code></a></a>&gt;</li>
1283-
</ul>
1284-
<h4><a name="method_descriptor.change_directory_permissions_at"><code>[method]descriptor.change-directory-permissions-at: func</code></a></h4>
1285-
<p>Change the permissions of a directory.</p>
1286-
<p>Note that the ultimate meanings of these permissions is
1287-
filesystem-specific.</p>
1288-
<p>Unlike in POSIX, the <code>executable</code> flag is not reinterpreted as a &quot;search&quot;
1289-
flag. <code>read</code> on a directory implies readability and searchability, and
1290-
<code>execute</code> is not valid for directories.</p>
1291-
<p>Note: This is similar to <code>fchmodat</code> in POSIX.</p>
1292-
<h5>Params</h5>
1293-
<ul>
1294-
<li><a name="method_descriptor.change_directory_permissions_at.self"><code>self</code></a>: borrow&lt;<a href="#descriptor"><a href="#descriptor"><code>descriptor</code></a></a>&gt;</li>
1295-
<li><a name="method_descriptor.change_directory_permissions_at.path_flags"><a href="#path_flags"><code>path-flags</code></a></a>: <a href="#path_flags"><a href="#path_flags"><code>path-flags</code></a></a></li>
1296-
<li><a name="method_descriptor.change_directory_permissions_at.path"><code>path</code></a>: <code>string</code></li>
1297-
<li><a name="method_descriptor.change_directory_permissions_at.modes"><a href="#modes"><code>modes</code></a></a>: <a href="#modes"><a href="#modes"><code>modes</code></a></a></li>
1298-
</ul>
1299-
<h5>Return values</h5>
1300-
<ul>
1301-
<li><a name="method_descriptor.change_directory_permissions_at.0"></a> result&lt;_, <a href="#error_code"><a href="#error_code"><code>error-code</code></a></a>&gt;</li>
1302-
</ul>
13031214
<h4><a name="method_descriptor.is_same_object"><code>[method]descriptor.is-same-object: func</code></a></h4>
13041215
<p>Test whether two descriptors refer to the same filesystem object.</p>
13051216
<p>In POSIX, this corresponds to testing whether the two descriptors have the

wit/types.wit

Lines changed: 0 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -142,29 +142,6 @@ interface types {
142142
truncate,
143143
}
144144

145-
/// Permissions mode used by `open-at`, `change-file-permissions-at`, and
146-
/// similar.
147-
flags modes {
148-
/// True if the resource is considered readable by the containing
149-
/// filesystem.
150-
readable,
151-
/// True if the resource is considered writable by the containing
152-
/// filesystem.
153-
writable,
154-
/// True if the resource is considered executable by the containing
155-
/// filesystem. This does not apply to directories.
156-
executable,
157-
}
158-
159-
/// Access type used by `access-at`.
160-
variant access-type {
161-
/// Test for readability, writeability, or executability.
162-
access(modes),
163-
164-
/// Test whether the path exists.
165-
exists,
166-
}
167-
168145
/// Number of hard links to an inode.
169146
type link-count = u64;
170147

@@ -538,8 +515,6 @@ interface types {
538515
open-flags: open-flags,
539516
/// Flags to use for the resulting descriptor.
540517
%flags: descriptor-flags,
541-
/// Permissions to use when creating a new file.
542-
modes: modes
543518
) -> result<descriptor, error-code>;
544519

545520
/// Read the contents of a symbolic link.
@@ -588,25 +563,6 @@ interface types {
588563
new-path: string,
589564
) -> result<_, error-code>;
590565

591-
/// Check accessibility of a filesystem path.
592-
///
593-
/// Check whether the given filesystem path names an object which is
594-
/// readable, writable, or executable, or whether it exists.
595-
///
596-
/// This does not a guarantee that subsequent accesses will succeed, as
597-
/// filesystem permissions may be modified asynchronously by external
598-
/// entities.
599-
///
600-
/// Note: This is similar to `faccessat` with the `AT_EACCESS` flag in POSIX.
601-
access-at: func(
602-
/// Flags determining the method of how the path is resolved.
603-
path-flags: path-flags,
604-
/// The relative path to check.
605-
path: string,
606-
/// The type of check to perform.
607-
%type: access-type
608-
) -> result<_, error-code>;
609-
610566
/// Unlink a filesystem object that is not a directory.
611567
///
612568
/// Return `error-code::is-directory` if the path refers to a directory.
@@ -616,40 +572,6 @@ interface types {
616572
path: string,
617573
) -> result<_, error-code>;
618574

619-
/// Change the permissions of a filesystem object that is not a directory.
620-
///
621-
/// Note that the ultimate meanings of these permissions is
622-
/// filesystem-specific.
623-
///
624-
/// Note: This is similar to `fchmodat` in POSIX.
625-
change-file-permissions-at: func(
626-
/// Flags determining the method of how the path is resolved.
627-
path-flags: path-flags,
628-
/// The relative path to operate on.
629-
path: string,
630-
/// The new permissions for the filesystem object.
631-
modes: modes,
632-
) -> result<_, error-code>;
633-
634-
/// Change the permissions of a directory.
635-
///
636-
/// Note that the ultimate meanings of these permissions is
637-
/// filesystem-specific.
638-
///
639-
/// Unlike in POSIX, the `executable` flag is not reinterpreted as a "search"
640-
/// flag. `read` on a directory implies readability and searchability, and
641-
/// `execute` is not valid for directories.
642-
///
643-
/// Note: This is similar to `fchmodat` in POSIX.
644-
change-directory-permissions-at: func(
645-
/// Flags determining the method of how the path is resolved.
646-
path-flags: path-flags,
647-
/// The relative path to operate on.
648-
path: string,
649-
/// The new permissions for the directory.
650-
modes: modes,
651-
) -> result<_, error-code>;
652-
653575
/// Test whether two descriptors refer to the same filesystem object.
654576
///
655577
/// In POSIX, this corresponds to testing whether the two descriptors have the

0 commit comments

Comments
 (0)