On Sun, Feb 27, 2011 at 2:49 PM, Devon McCormick <[email protected]> wrote:
> However, I was dismayed to find
> that the supplied "dir" verb returns information in a much less useful
> format than my own simple definition "dir=: 1!:0@<".
>
Not sure if you're aware that dir takes a left argument that gives you
a variety of output formats.
I think you can get the same output as your definition by using a left
argument of 2 1 . i.e ( 2 1 dir '' )
NB.*dir v directory listings
NB.
NB. y = dos file specification:
NB. if empty, defaults to *
NB.
NB. x is optional:
NB. - if not given, defaults to 'n'
NB. - if character, returns a formatted directory,
NB. where x is the sort option:
NB. d=by date
NB. n=by name
NB. s=by size
NB. - if numeric, there are 1 or 2 elements:
NB. 0{ 0= list short names
NB. 1= boxed list of full pathnames
NB. 2= full directory list
NB. 1{ 0= filenames only (default)
NB. 1= include subdirectories
NB.
NB. subdirectories are shown first
NB. filenames are returned in lower case
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm