about summary refs log tree commit diff
path: root/library/std/src/fs
AgeCommit message (Collapse)AuthorLines
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.