This script defines directory utilities and is included in the J standard library. Definitions are loaded into the z locale.
D | dir, dircompare, dircompares, dirfind, dirpath, dirss, dirssrplc, dirtree, dirused |
dircompare | v | compare files in directories |
dircompares | v | compare files in directories |
dirss | v | directory string search |
dirused | v | get count and space of files in directory tree |
dir ''
1 dir jpath '~system/main/d*.ijs'
Find name in directory
string dirfind directory
Return directory paths starting from y
dirpath 'examples'
Directory string search and replace.
(old;new) dirssrplc files
('old';'new') dirssrplc jpath '~system/main/*.ijs'
Return filenames in directory tree as boxed matrix
Optional x is a timestamp to exclude earlier files.
Each row contains: filename;timestamp;size
Directory search is recursive through subdirectories
Filenames are returned in lower case in OSX or Windows
Ignores hidden directories
Global DirTreeX_j_
(set in session configuration) is a list of directories to exclude from the search. e.g. DirTreeX_j_=: 'cvs' to exclude cvs directories.
dirtree ''
dirtree 'main'
dirtree jpath '~system/packages/*.ijs'
2014 5 23 dirtree '' - files dated on or after date.