>>  <<  Ndx  Usr  Pri  JfC  LJ  Phr  Dic  Rel  Voc  !:  wd  Help  User

dir: directory utilities

Name Type Description
dir verb directory listings
dircompare verb compare files in directories
dirfind verb find name in directory
dirpath verb directory paths
dirs verb browse files in directory
dirss verb directory string search
dirssrplc verb directory string search and replace
dirtree verb get filenames in directory tree
dirused verb get count and space of files in directory tree


directory listings

y = dos file specification:
     if empty, defaults to *

x is optional:
   - if not given, defaults to 'n'
   - if character, returns a formatted directory,
       where x is the sort option:
         d=by date
         n=by name
         s=by size
   - if numeric, there are 1 or 2 elements:
         0{  0= list short names
             1= boxed list of full pathnames
             2= full directory list
         1{  0= filenames only (default)
             1= include subdirectories

subdirectories are shown first
filenames are returned in lower case

e.g.  dir ''
      1 dir jpath '~system\main\d*.ijs'


compare files in directories

form: [opt] dircompare dirs

  dirs = directory names
  opt is optional, with up to three elements:
    0{  =0 short file comparison (default)
        =1 long file comparison
    1{  =0 given directory only (default)
        =1 recurse through subdirectories
    2{  =0 file contents only (default)
        =1 also compare timestamps

e.g.  dircompare 'main \jbak\main'

returns text result or error message


find name in directory
find name in directory

form: string dirfind directory

returns filenames in directory tree containing string

e.g. 'jfile' dirfind 'packages'


directory paths
return directory paths starting from y
optional x=0  all paths (default)
            1  non-empty paths (i.e. having files)
e.g. dirpath 'examples'


browse files in directory
e.g.  dirs jpath '~system\main\*.ijs'


directory string search

form: string dirss directory

searches for files in directory tree containing string,
returning formatted display where found.

e.g. 'create' dirss 'main'

If x is a 2-element boxed list, calls dirssrplc


directory string search and replace
form: (old;new) dirssrplc files
   ('old';'new') dirssrplc jpath '~system\main\*.ijs'


get filenames in directory tree
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

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.

e.g.  dirtree ''
      dirtree 'main'
      dirtree jpath '~system\packages\*.ijs'
2004 5 23 dirtree ''   - files dated on or after date.

>>  <<  Ndx  Usr  Pri  JfC  LJ  Phr  Dic  Rel  Voc  !:  wd  Help  User