Skip to main content

Module vfs

Module vfs 

Source
Expand description

VFS management commands

Re-exportsยง

use crate::shell::ShellError; ๐Ÿ”’
use crate::shell_println; ๐Ÿ”’
use crate::vfs; ๐Ÿ”’
use crate::vfs::scheme::DT_DIR; ๐Ÿ”’
use crate::vfs::OpenFlags; ๐Ÿ”’
use alloc::string::String; ๐Ÿ”’
use alloc::vec::Vec; ๐Ÿ”’
use spin::Lazy; ๐Ÿ”’
pub use cat::cmd_cat;
pub use cd::cmd_cd;
pub use cp::cmd_cp;
pub use df::cmd_df;
pub use ls::cmd_ls;
pub use mkdir::cmd_mkdir;
pub use mount::cmd_mount;
pub use mv::cmd_mv;
pub use rm::cmd_rm;
pub use scheme::cmd_scheme;
pub use stat::cmd_stat;
pub use touch::cmd_touch;
pub use umount::cmd_umount;
pub use write::cmd_write;

Modulesยง

cat ๐Ÿ”’
cd ๐Ÿ”’
cp ๐Ÿ”’
df ๐Ÿ”’
ls ๐Ÿ”’
mkdir ๐Ÿ”’
mount ๐Ÿ”’
mv ๐Ÿ”’
rm ๐Ÿ”’
scheme ๐Ÿ”’
stat ๐Ÿ”’
touch ๐Ÿ”’
umount ๐Ÿ”’
write ๐Ÿ”’

Staticsยง

SHELL_CWD ๐Ÿ”’
Current working directory for the chevron shell.

Functionsยง

cmd_cat_impl ๐Ÿ”’
Display file contents. Display file contents or piped input.
cmd_cd_impl ๐Ÿ”’
Change the shell working directory.
cmd_cp_impl ๐Ÿ”’
cmd_df_impl ๐Ÿ”’
cmd_ls_impl ๐Ÿ”’
List directory contents or mount points.
cmd_mkdir_impl ๐Ÿ”’
Create a new directory.
cmd_mount_impl ๐Ÿ”’
Performs the cmd mount operation.
cmd_mv_impl ๐Ÿ”’
cmd_rm_impl ๐Ÿ”’
Remove a file or directory.
cmd_scheme_impl ๐Ÿ”’
List registered schemes.
cmd_stat_impl ๐Ÿ”’
cmd_touch_impl ๐Ÿ”’
Create a new empty file.
cmd_umount_impl ๐Ÿ”’
Performs the cmd umount operation.
cmd_write_impl ๐Ÿ”’
format_mode ๐Ÿ”’
Format st_mode into a 10-char permission string like drwxr-xr-x.
format_mtime ๐Ÿ”’
Format mtime (seconds since epoch) into Mon DD HH:MM.
get_cwd
Read the current working directory.
normalize_path ๐Ÿ”’
Collapse .., . and redundant / in an absolute path.
resolve_shell_path
Resolve path relative to the shell CWD.
set_cwd ๐Ÿ”’
Sets cwd.