about summary refs log tree commit diff
path: root/library/std/src/fs
AgeCommit message (Collapse)AuthorLines
2022-01-29fs: Add a regression test for #93384Tavian Barnes-0/+16
2022-01-19Fix CVE-2022-21658 for UNIX-likeHans Kratz-0/+70
2021-12-18Update stdlib to the 2021 editionLucas Kent-5/+4
2021-12-14Fix a bunch of typosFrank Steffahn-1/+1
2021-11-19Rollup merge of #90942 - JohnTitor:should-os-error-3, r=m-ou-seYuki Okushi-0/+4
windows: Return the "Not Found" error when a path is empty Fixes #90940
2021-11-17windows: Return the "Not Found" error when a path is emptyYuki Okushi-0/+4
2021-11-11compare between Path instead of strtamaron-12/+3
2021-10-23Make sure `CreateDirectoryW` works for path lengths > 247Chris Denton-0/+29
2021-07-29Fix may not to appropriate might not or must notAli Malik-1/+1
2021-07-10Make tests pass on old macosAris Merchant-0/+18
On old macos systems, `fs::hard_link()` will follow symlinks. This changes the test `symlink_hard_link` to exit early on these systems, so that tests can pass.
2021-06-15Rename ErrorKind::Unknown to Uncategorized.Mara Bos-1/+2
2021-06-15Redefine `ErrorKind::Other` and stop using it in std.Mara Bos-1/+1
2021-04-18Fix test `metadata_access_times` to also check for `Unsupported`Christiaan Dirkx-1/+3
2020-11-16std: Fix test `got_symlink_permission` on WindowsVadim Petrochenkov-0/+3
2020-11-09Rollup merge of #78026 - sunfishcode:symlink-hard-link, r=dtolnayDylan DPC-0/+51
Define `fs::hard_link` to not follow symlinks. POSIX leaves it [implementation-defined] whether `link` follows symlinks. In practice, for example, on Linux it does not and on FreeBSD it does. So, switch to `linkat`, so that we can pick a behavior rather than depending on OS defaults. Pick the option to not follow symlinks. This is somewhat arbitrary, but seems the less surprising choice because hard linking is a very low-level feature which requires the source and destination to be on the same mounted filesystem, and following a symbolic link could end up in a different mounted filesystem. [implementation-defined]: https://pubs.opengroup.org/onlinepubs/9699919799/functions/link.html
2020-10-16Define `fs::hard_link` to not follow symlinks.Dan Gohman-0/+51
POSIX leaves it implementation-defined whether `link` follows symlinks. In practice, for example, on Linux it does not and on FreeBSD it does. So, switch to `linkat`, so that we can pick a behavior rather than depending on OS defaults. Pick the option to not follow symlinks. This is somewhat arbitrary, but seems the less surprising choice because hard linking is a very low-level feature which requires the source and destination to be on the same mounted filesystem, and following a symbolic link could end up in a different mounted filesystem.
2020-10-13Join map operatorswcampbell-2/+1
Signed-off-by: wcampbell <wcampbell1995@gmail.com>
2020-08-31std: move "mod tests/benches" to separate filesLzu Tao-0/+1339
Also doing fmt inplace as requested.