Hi guys, I have a project where we have to implement the ls command and some options.
One of those options is -l, and so I am trying to get the file information in hand.
I am using this for the code:
No matter what I pass in as the fileName, I get -1 back =\Code:getcwd(fileName, (MAX_FNAME + 1)); strcat(fileName, "/"); if (stat(fileName, status) == -1) { puts("Status Failed!"); return 0; }
I have checked what fileName is, and it looks ok to me...
Any ideas?