os.Path.dirSort

Defines the sort criteria and sort order for os.Path.dirOpen().

Syntax

os.Path.dirSort(
   criteria STRING,
   order INTEGER )
  1. criteria is the sort criteria.
  2. order defines ascending (1) or descending (-1) order.

Usage

When you call this function, you define the sort criteria and sort order for any subsequent os.Path.dirOpen() call.

The criteria parameter must be one of the following strings:

When sorting by name, directory entries will be ordered according to the current locale.

When sorting by any criteria other than the file name, entries having the same value for the given criteria are ordered by name following the value of the order parameter.