Little overall changes
- Changed 'dir' cmd to 'ls' - Added a version check skip - Changed the logo color - Updated README.md
This commit is contained in:
parent
94c62f3d6b
commit
023dcf2d3e
4 changed files with 41 additions and 24 deletions
|
|
@ -35,13 +35,15 @@ void showDirectory(char *arg[]){
|
|||
realpath(arg[1], path); //Get the absolute path of the directory
|
||||
if(d){
|
||||
while((dir = readdir(d))){
|
||||
if(dir->d_type == 8){ //IF IS FILE
|
||||
if(strcmp(dir->d_name, ".") && strcmp(dir->d_name, "..")){
|
||||
if(dir->d_type == 8){ //IF IS FILE
|
||||
printf("\033[1;34m%s\033[0m\n", dir->d_name);
|
||||
} else if(dir->d_type == 4){ //IF IS DIR
|
||||
printf("\033[1;33m%s\033[0m\n", dir->d_name);
|
||||
} else { //IF IS !FILE AND !DIR
|
||||
printf("%s\n", dir->d_name);
|
||||
}
|
||||
}
|
||||
}
|
||||
closedir(d); //Close directory
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue