MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / cmd_ls

Function cmd_ls

components/finsh/msh_file.c:159–181  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

157#endif
158
159static int cmd_ls(int argc, char **argv)
160{
161 extern void ls(const char *pathname);
162
163 if (argc == 1)
164 {
165#ifdef DFS_USING_WORKDIR
166#ifdef RT_USING_SMART
167 ls(lwp_getcwd());
168#else
169 ls(working_directory);
170#endif
171#else
172 ls("/");
173#endif
174 }
175 else
176 {
177 ls(argv[1]);
178 }
179
180 return 0;
181}
182MSH_CMD_EXPORT_ALIAS(cmd_ls, ls, List information about the FILEs.);
183
184#ifdef RT_USING_DFS_V2

Callers

nothing calls this directly

Calls 2

lwp_getcwdFunction · 0.85
lsFunction · 0.50

Tested by

no test coverage detected