2016 Update
This commit is contained in:
parent
948b86eafa
commit
dcf5d15da3
7965 changed files with 139854 additions and 31002 deletions
|
|
@ -1,17 +1,32 @@
|
|||
Write a program that will list everything in the current folder, similar to the Unix utility “<tt>ls</tt>” [http://man7.org/linux/man-pages/man1/ls.1.html] (or the Windows terminal command “<tt>DIR</tt>”). The output must be sorted, but printing extended details and producing multi-column output is not required.
|
||||
;Task:
|
||||
Write a program that will list everything in the current folder, similar to:
|
||||
:::* the Unix utility “<tt>ls</tt>” [http://man7.org/linux/man-pages/man1/ls.1.html] or
|
||||
:::* the Windows terminal command “<tt>DIR</tt>”
|
||||
|
||||
<br>
|
||||
The output must be sorted, but printing extended details and producing multi-column output is not required.
|
||||
|
||||
|
||||
;Example output
|
||||
For the list of paths:
|
||||
<pre>/foo/bar
|
||||
<pre>
|
||||
/foo/bar
|
||||
/foo/bar/1
|
||||
/foo/bar/2
|
||||
/foo/bar/a
|
||||
/foo/bar/b</pre>
|
||||
/foo/bar/b
|
||||
</pre>
|
||||
|
||||
When the program is executed in `/foo`, it should print:
|
||||
<pre>bar</pre>
|
||||
and when the program is executed in `/foo/bar`, it should print:
|
||||
<pre>1
|
||||
|
||||
When the program is executed in `/foo`, it should print:
|
||||
<pre>
|
||||
bar
|
||||
</pre>
|
||||
and when the program is executed in `/foo/bar`, it should print:
|
||||
<pre>
|
||||
1
|
||||
2
|
||||
a
|
||||
b</pre>
|
||||
b
|
||||
</pre>
|
||||
<br><br>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue