|
@@ -1,7 +1,10 @@
|
|
|
#define _DEFAULT_SOURCE
|
|
|
|
|
|
#include <dirent.h>
|
|
|
+#include <unistd.h>
|
|
|
#include "parser.h"
|
|
|
+#include "error.h"
|
|
|
+#include "color.h"
|
|
|
|
|
|
|
|
|
void lsBasics(int argc, char* argv[]){
|
|
@@ -16,10 +19,10 @@ void lsBasics(int argc, char* argv[]){
|
|
|
}
|
|
|
|
|
|
//Ouverture et lecture DIR
|
|
|
- if((path = opendir(buffer)) == NULL){
|
|
|
+ /*if((path = opendir(buffer)) == NULL){
|
|
|
addperror("Erreur opendir()")
|
|
|
return;
|
|
|
- }
|
|
|
+ }*/
|
|
|
|
|
|
//Recup la liste des fichiers dans le dossier courant
|
|
|
nbFile = scandir(buffer, &contentsDir, 0, alphasort);
|
|
@@ -40,4 +43,5 @@ void lsBasics(int argc, char* argv[]){
|
|
|
|
|
|
int main(int argc, char* argv[]){
|
|
|
lsBasics(argc, argv);
|
|
|
+ printf(RESET);
|
|
|
}
|