fn: dir/ls
[contents]

Contents

Syntax

The syntax for dir/ls calls is:

f++:  
dir(param)
dir param
ls(param)
ls param

n++:  
@dir(param)
@dir param
@ls(param)
@ls param

Description

The dir/ls function is for listing files in a directory, it takes zero parameters or a single parameter specifying which directory to list files for.

Note: Paths can be unoquoted, single quoted or double quoted.

Options

The following options are available for dir/ls calls:

option description
1 list one file per line
a do not ignore entries starting with .
!c do not list files on console
c list files on console
option description
Note: If other options are given Nift will attempt to use the system's underlying dir/ls function instead.

f++ example

Examples of dir/ls being used with f++:

ls
ls 1 ~/
dir -l "/usr/local/bin"
dir{a}("/usr/local")

n++ example

Example of dir/ls being used with n++:

@ls
@ls 1 ~/
@dir -l "/usr/local/bin"
@dir{a}("/usr/local")