MCPcopy Create free account
hub / github.com/bytecodealliance/rustix / symlink

Function symlink

src/fs/abs.rs:215–219  ·  view source on GitHub ↗
(old_path: P, new_path: Q)

Source from the content-addressed store, hash-verified

213/// [Linux]: https://man7.org/linux/man-pages/man2/symlink.2.html
214#[inline]
215pub fn symlink<P: path::Arg, Q: path::Arg>(old_path: P, new_path: Q) -> io::Result<()> {
216 old_path.into_with_c_str(|old_path| {
217 new_path.into_with_c_str(|new_path| backend::fs::syscalls::symlink(old_path, new_path))
218 })
219}
220
221/// `mkdir(path, mode)`—Creates a directory.
222///

Callers 4

test_readlinkFunction · 0.50
test_chmodFunction · 0.50
test_statFunction · 0.50
test_symlinkFunction · 0.50

Calls 1

into_with_c_strMethod · 0.80

Tested by 4

test_readlinkFunction · 0.40
test_chmodFunction · 0.40
test_statFunction · 0.40
test_symlinkFunction · 0.40