Rollup merge of #93635 - GuillaumeGomez:missing-platform-spec-info, r=Amanieu
Add missing platform-specific information on current_dir and set_current_dir Fixes #93598.
This commit is contained in:
commit
15d71cff2d
1 changed files with 10 additions and 0 deletions
|
@ -23,6 +23,11 @@ use crate::sys::os as os_imp;
|
|||
|
||||
/// Returns the current working directory as a [`PathBuf`].
|
||||
///
|
||||
/// # Platform-specific behavior
|
||||
///
|
||||
/// This function currently corresponds to the `getcwd` function on Unix
|
||||
/// and the `GetCurrentDirectoryW` function on Windows.
|
||||
///
|
||||
/// # Errors
|
||||
///
|
||||
/// Returns an [`Err`] if the current working directory value is invalid.
|
||||
|
@ -49,6 +54,11 @@ pub fn current_dir() -> io::Result<PathBuf> {
|
|||
|
||||
/// Changes the current working directory to the specified path.
|
||||
///
|
||||
/// # Platform-specific behavior
|
||||
///
|
||||
/// This function currently corresponds to the `chdir` function on Unix
|
||||
/// and the `SetCurrentDirectoryW` function on Windows.
|
||||
///
|
||||
/// Returns an [`Err`] if the operation fails.
|
||||
///
|
||||
/// # Examples
|
||||
|
|
Loading…
Add table
Reference in a new issue