Closed azzamsa closed 1 year ago
let paths = fs::read_dir("/home/user/.tmp"))?;
for path in paths {
sh.remove_path(path?.path())?;
}
Solved :tada:
FWIW, I think it would make sense for xshell to support globbing, but yeah, that’s not impemented
Hi.
I am having a hard time removing all files inside a directory. With bash, I can use
rm -rf /home/user/.tmp/*
(note asterisk). With xshell, it doesn't work.My only option is to remove the
.tmp
directory and recreate it again. Is there any way to tell xshell to remove the content of a directory, similar to.tmp/*
, leaving the parent directory (.tmp
) intact?Thanks a lot for xshell :heart: