File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 10081008However, it is not part of SUSv4 and thus not portable, unfortunately.
10091009The portable way is to call \texttt {stat } on each directory entry.
10101010\item \texttt {rmdir } does not work on directories that are not empty. You have
1011- to remove all entries before you can delete a directory. You you use
1011+ to remove all entries before you can delete a directory. You can use
10121012\texttt {system("rm -r xxx") } etc. but be careful to sanitize the environment and
10131013the directory name to avoid any security implications.
10141014\item \label {REMOVE } The specification also defines \texttt {remove } which
10301030 while(de = \emprg{readdir}(d))
10311031 printf("%s\bs{}n", de->d_name);
10321032 \emprg{closedir}(d);
1033- \}
1033+ \}
10341034 return (0);
10351035\}
10361036\end {alltt }
You can’t perform that action at this time.
0 commit comments