lxutil/unix/path.rs
1// Copyright (c) Microsoft Corporation.
2// Licensed under the MIT License.
3
4use std::borrow::Cow;
5use std::ffi::OsStr;
6use std::os::unix::prelude::*;
7use std::path::Path;
8
9// No-op implementation of path_from_lx for Unix.
10pub fn path_from_lx(path: &[u8]) -> lx::Result<Cow<'_, Path>> {
11 Ok(Cow::Borrowed(OsStr::from_bytes(path).as_ref()))
12}