about summary refs log tree commit diff
path: root/src/libstd/os/linux/fs.rs
AgeCommit message (Collapse)AuthorLines
2020-07-27mv std libs to library/mark-378/+0
2020-07-09libstd/libcore: fix various typosAndy Russell-1/+1
2020-03-06fix various typosMatthias Krüger-1/+1
2019-11-29Format libstd/os with rustfmtDavid Tolnay-8/+2
This commit applies rustfmt with rust-lang/rust's default settings to files in src/libstd/os *that are not involved in any currently open PR* to minimize merge conflicts. THe list of files involved in open PRs was determined by querying GitHub's GraphQL API with this script: https://gist.github.com/dtolnay/aa9c34993dc051a4f344d1b10e4487e8 With the list of files from the script in outstanding_files, the relevant commands were: $ find src/libstd/os -name '*.rs' \ | xargs rustfmt --edition=2018 --unstable-features --skip-children $ rg libstd/os outstanding_files | xargs git checkout -- Repeating this process several months apart should get us coverage of most of the rest of the files. To confirm no funny business: $ git checkout $THIS_COMMIT^ $ git show --pretty= --name-only $THIS_COMMIT \ | xargs rustfmt --edition=2018 --unstable-features --skip-children $ git diff $THIS_COMMIT # there should be no difference
2019-08-06doc: Reword deprecation message of MetadataExt::as_raw_statLzu Tao-3/+4
2019-02-28libstd => 2018Taiki Endo-5/+3
2018-12-25Remove licensesMark Rousskov-10/+0
2018-11-22Make std::os::unix/linux::fs::MetadataExt::a/m/ctime* documentation clearerariasuni-6/+12
2018-04-14Add doc links to `std::os` extension traitsDylan MacKenzie-1/+3
Add documentation links to the original type for various OS-specific extension traits and normalize the language for introducing such traits. Also, remove some outdated comments around the extension trait definitions.
2018-03-28Remove hidden `foo` functions from doc examples; use `Termination` trait.Corey Farwell-119/+119
Fixes https://github.com/rust-lang/rust/issues/49233.
2017-10-24Fix doc build on other architectures than linuxGuillaume Gomez-17/+17
2017-10-19Add missing code examplesGuillaume Gomez-1/+241
2017-03-29Improve os::linux documentation (#29367)Camille TJHOA-0/+19
2016-02-13std: Deprecate all std::os::*::raw typesAlex Crichton-0/+128
This commit is an implementation of [RFC 1415][rfc] which deprecates all types in the `std::os::*::raw` modules. [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/1415-trim-std-os.md Many of the types in these modules don't actually have a canonical platform representation, for example the definition of `stat` on 32-bit Linux will change depending on whether C code is compiled with LFS support or not. Unfortunately the current types in `std::os::*::raw` are billed as "compatible with C", which in light of this means it isn't really possible. To make matters worse, platforms like Android sometimes define these types as *smaller* than the way they're actually represented in the `stat` structure itself. This means that when methods like `DirEntry::ino` are called on Android the result may be truncated as we're tied to returning a `ino_t` type, not the underlying type. The commit here incorporates two backwards-compatible components: * Deprecate all `raw` types that aren't in `std::os::raw` * Expand the `std::os::*::fs::MetadataExt` trait on all platforms for method accessors of all fields. The fields now returned widened types which are the same across platforms (consistency across platforms is not required, however, it's just convenient). and two also backwards-incompatible components: * Change the definition of all `std::os::*::raw` type aliases to correspond to the newly widened types that are being returned on each platform. * Change the definition of `std::os::*::raw::stat` on Linux to match the LFS definitions rather than the standard ones. The breaking changes here will specifically break code that assumes that `libc` and `std` agree on the definition of `std::os::*::raw` types, or that the `std` types are faithful representations of the types in C. An [audit] has been performed of crates.io to determine the fallout which was determined two be minimal, with the two found cases of breakage having been fixed now. [audit]: https://github.com/rust-lang/rfcs/pull/1415#issuecomment-180645582 --- Ok, so after all that, we're finally able to support LFS on Linux! This commit then simultaneously starts using `stat64` and friends on Linux to ensure that we can open >4GB files on 32-bit Linux. Yay! Closes #28978 Closes #30050 Closes #31549