#####Mimic unix's ls function.
#####Grade (105/100)
(105/119)*
Goals:
- Recode part of the ls function.
- "l" flag. (Long format)
- "R" flag. (Recursive folder exploration)
- "a" flag. (Show hidden files)
- "r" flag. (Reverse sort)
- "t" flag. (Sort by modification time)
Recommended bonuses:
- Handle multi-column output when "l" option is disabled
- Print Access Control List, and extented attributes with "l" option.
- "u" flag. (With "t": Use access time) (With "l": Show access time)
- "f" flag. (Do not sort)
- "g" flag. (Like "l", do not list file owner)
- "d" flag. (Treat all path arguments as files)
- "G" flag. (Colors)
My additions:
- "A" flag. (Like "a", but do not list . and .. entries)
- "B" flag. (Print numeric value for non-printable characters)
- "C" flag. (Force multi-colum printing when stdout is not a TTY)
- "F" flag. (Append indicator to file names "*/=@|%")
- "b" flag. (Like "B", but use C escape codes whenever possible)
- "h" flag. (Human readable sizes)
- "n" flag. (Numeric uid and gid)
- "o" flag. (Like "l", do not list group informations)
- "1" flag. (Single-column output when "l" option is disabled)
![ft_ls](http://i.imgur.com/yABt6Jd.png)
All my C files strictly observes school's norm, it may often lead to odd or illogical syntaxes.
- [ ] Forbiden keywords: for, do, switch, goto.
- [ ] No more than 25 lines inside a function block.
- [ ] No more than 80 characters per lines.
- [ ] At most 5 functions per files.
- [ ] Only 1 declaration per line.
- [ ] No declaration and assignation on the same line.
- [ ] At most 1 assignation per line.
- [ ] No more than 4 parameters for a function.
- [ ] No nested ternary.
- [ ] Comments alowed at the top of the file.
*
- A grade of 85 was required to validate the project.
- A maximum grade of 119 was reachable.
- Second sessions are organised for failed projects.