From cdbd4471aadb918c6631f9cd18bff4b98fbef99c Mon Sep 17 00:00:00 2001 From: Abdellah El Morabit Date: Sat, 22 Feb 2025 13:16:03 +0100 Subject: i think everything works except for the new features im planning on adding and the remove file/ directory permissions but i dont know how to do that yet --- ls.c | 42 ------------------------------------------ 1 file changed, 42 deletions(-) delete mode 100644 ls.c (limited to 'ls.c') diff --git a/ls.c b/ls.c deleted file mode 100644 index 876e60e..0000000 --- a/ls.c +++ /dev/null @@ -1,42 +0,0 @@ -/* - * ===================================================================================== - * - * Filename: ls.c - * - * Description: - * - * Version: 1.0 - * Created: 02/18/2025 15:39:55 - * Revision: none - * Compiler: gcc - * - * Author: YOUR NAME (), - * Organization: - * - * ===================================================================================== - */ -#include -#include -#include - - -int main(){ - - char *path = "folder"; - struct dirent *entry; - DIR *dP = opendir(path); - - // check if the directory got opened successfully - if (dP == NULL) { - perror("opendir"); - return 1; - } - - // print the folder|directory name - while ((entry = readdir(dP)) != NULL) { - char *temporary_variable = entry->d_name; - printf("%s\n", entry->d_name); - } - closedir(dP); - -} -- cgit v1.2.3-70-g09d2