about summary refs log tree commit diff
path: root/src/libstd/sys/redox/fs.rs
AgeCommit message (Collapse)AuthorLines
2019-04-03wasi: Fill out `std::fs` module for WASIAlex Crichton-38/+4
This commit fills out the `std::fs` module and implementation for WASI. Not all APIs are implemented, such as permissions-related ones and `canonicalize`, but all others APIs have been implemented and very lightly tested so far. We'll eventually want to run a more exhaustive test suite! For now the highlights of this commit are: * The `std::fs::File` type is now backed by `WasiFd`, a raw WASI file descriptor. * All APIs in `std::fs` (except permissions/canonicalize) have implementations for the WASI target. * A suite of unstable extension traits were added to `std::os::wasi::fs`. These traits expose the raw filesystem functionality of WASI, namely `*at` syscalls (opening a file relative to an already opened one, for example). Additionally metadata only available on wasi is exposed through these traits. Perhaps one of the most notable parts is the implementation of path-taking APIs. WASI actually has no fundamental API that just takes a path, but rather everything is relative to a previously opened file descriptor. To allow existing APIs to work (that only take a path) WASI has a few syscalls to learn about "pre opened" file descriptors by the runtime. We use these to build a map of existing directory names to file descriptors, and then when using a path we try to anchor it at an already-opened file. This support is very rudimentary though and is intended to be shared with C since it's likely to be so tricky. For now though the C library doesn't expose quite an API for us to use, so we implement it for now and will swap it out as soon as one is available.
2019-03-31libstd: deny(elided_lifetimes_in_paths)Mazdak Farrokhzad-2/+2
2019-02-28libstd => 2018Taiki Endo-12/+12
2018-12-25Remove licensesMark Rousskov-10/+0
2018-11-06refactor: use shorthand fieldsteresy-1/+1
2017-12-27Implement rename using new system callJeremy Soller-6/+13
Fix readlink and symlink to utilize O_CLOEXEC
2017-11-09Add futex timeoutJeremy Soller-2/+1
2017-07-12Update fs.rsJeremy Soller-1/+1
2017-07-12Update fs.rsJeremy Soller-2/+3
2017-07-12Rollup merge of #43100 - ids1024:stat2, r=aturonMark Simulacrum-2/+2
Redox: add stat methods(); support is_symlink()
2017-07-11Redox: Use O_NOFOLLOW for lstat()Ian Douglas Scott-1/+4
2017-07-06Redox: add stat methods(); support is_symlink()Ian Douglas Scott-2/+2
2017-06-30Fix long lineIan Douglas Scott-1/+2
2017-06-29redox: symlink and readlinkIan Douglas Scott-4/+10
2017-06-20Add `Read::initializer`.Steven Fackler-4/+0
This is an API that allows types to indicate that they can be passed buffers of uninitialized memory which can improve performance.
2016-12-23Cloexec when creating directoriesJeremy Soller-1/+1
2016-12-23Add Debug to OpenOptions and DirBuilderJeremy Soller-1/+2
2016-11-28Commit to fix make tidyJeremy Soller-5/+9
2016-11-28Remove file path from std::fs::FileJeremy Soller-4/+2
2016-11-28Switch to using syscall crate directly - without importJeremy Soller-66/+59
2016-11-25Fix canonicalizeJeremy Soller-3/+2
2016-11-25Use O_DIRECTORYJeremy Soller-9/+12
2016-11-23Add File set_permissionsJeremy Soller-0/+4
2016-11-15Use chmod instead of fcntl to change file permsJeremy Soller-4/+1
2016-11-15Add set_permJeremy Soller-3/+6
2016-11-10Fix readdirJeremy Soller-7/+11
2016-10-29Implement env, reentrant mutex, and partially implement scoped thread ↵Jeremy Soller-0/+4
locals. Better error messages for unsupported features
2016-10-28Remove unsafe libc layerJeremy Soller-140/+46
2016-10-27Add redox systemJeremy Soller-0/+554