rt: add stubs for current_exe()/home_directory()/make_temp_directory()
This commit is contained in:
parent
97e11c3bee
commit
dfa6f7c296
@ -31,6 +31,14 @@ pub use abi::io::{
|
||||
use abi::{error::Error, io::DeviceRequest, process::ProcessOption, util::FixedString};
|
||||
use alloc::string::String;
|
||||
|
||||
pub fn current_exe<T, F: FnOnce(&str) -> T>(_mapper: F) -> Result<T, Error> {
|
||||
todo!()
|
||||
}
|
||||
|
||||
pub fn home_directory<T, F: FnOnce(&str) -> T>(_mapper: F) -> Result<T, Error> {
|
||||
todo!()
|
||||
}
|
||||
|
||||
pub fn current_directory<T, F: FnOnce(&str) -> T>(mapper: F) -> Result<T, Error> {
|
||||
let mut option = ProcessOption::Directory(FixedString::empty());
|
||||
unsafe { crate::sys::get_process_option(&mut option) }?;
|
||||
@ -51,6 +59,10 @@ pub fn set_current_directory(path: &str) -> Result<(), Error> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn make_temp_directory(_template: &mut [u8]) -> Result<(), Error> {
|
||||
todo!()
|
||||
}
|
||||
|
||||
pub fn is_terminal(f: RawFd) -> bool {
|
||||
let mut option = DeviceRequest::IsTerminal(false);
|
||||
let res = unsafe { crate::sys::device_request(f, &mut option) };
|
||||
|
Loading…
x
Reference in New Issue
Block a user