diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-04-21 15:23:06 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-04-21 15:23:06 -0700 |
| commit | 2fc2e12687ba7e48aef1c1d8efc6588a90e24010 (patch) | |
| tree | 91d1d6a4c12e4510cac10de16e0b74d59bd24f0a /src/rustllvm/ExecutionEngineWrapper.cpp | |
| parent | 75f35657b309fba4d4dee5c32516bcd08a41b1b6 (diff) | |
| parent | 3cc84efcdd5727c0749d766d8abd79d8077f9cec (diff) | |
| download | rust-2fc2e12687ba7e48aef1c1d8efc6588a90e24010.tar.gz rust-2fc2e12687ba7e48aef1c1d8efc6588a90e24010.zip | |
rollup merge of #24222: lambda/rename-soft-link-to-symlink
Implement [RFC #1048][rfc].
On Windows, when you create a symbolic link you must specify whether it
points to a directory or a file, even if it is created dangling, while
on Unix, the same symbolic link could point to a directory, a file, or
nothing at all. Furthermore, on Windows special privilege is necessary
to use a symbolic link, while on Unix, you can generally create a
symbolic link in any directory you have write privileges to.
This means that it is unlikely to be able to use symbolic links purely
portably; anyone who uses them will need to think about the cross
platform implications. This means that using platform-specific APIs
will make it easier to see where code will need to differ between the
platforms, rather than trying to provide some kind of compatibility
wrapper.
Furthermore, `soft_link` has no precedence in any other API, so to avoid
confusion, move back to the more standard `symlink` terminology.
Create a `std::os::unix::symlink` for the Unix version that is
destination type agnostic, as well as `std::os::windows::{symlink_file,
symlink_dir}` for Windows.
Because this is a stable API, leave a compatibility wrapper in
`std::fs::soft_link`, which calls `symlink` on Unix and `symlink_file`
on Windows, preserving the existing behavior of `soft_link`.
[rfc]: https://github.com/rust-lang/rfcs/pull/1048
Diffstat (limited to 'src/rustllvm/ExecutionEngineWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
