Empty directory: Difference between revisions
→{{header|J}}: reference correct Foreign
No edit summary |
(→{{header|J}}: reference correct Foreign) |
||
Line 102:
=={{header|J}}==
<lang j>require 'dir'
empty_dir=: 0 = '/*' #@dir@,~ ]</lang>
In other words, list the contents of the directory, count how many items are in it, and test if that count was zero.
Note that <code>1!:
Example, under windows, create some directories using cygwin:
|