PKUOS - Pintos
Pintos source browser for PKU Operating System course
|
Go to the source code of this file.
Functions | |
static bool | list_dir (const char *dir, bool verbose) |
ls.c More... | |
int | main (int argc, char *argv[]) |
Lists the contents of the directory or directories named on the command line, or of the current directory if none are named.
By default, only the name of each file is printed. If "-l" is given as the first argument, the type, size, and inumber of each file is also printed. This won't work until project 4.
Definition at line 16 of file ls.c.
References close(), filesize(), inumber(), isdir(), name, open(), printf(), readdir(), READDIR_MAX_LEN, and snprintf().
Referenced by main().
int main | ( | int argc | , |
char * | argv[] | ||
) |
Definition at line 68 of file ls.c.
References EXIT_FAILURE, EXIT_SUCCESS, list_dir(), and strcmp().