Module posix.glob

Generate pathnames matching a shell-style pattern.

Functions generating a table of filenames that match a shell-style pattern string.

Functions

glob ([pat="*"], flags) Find all files in this directory matching a shell pattern.

Constants

posix.glob Glob constants.


Functions

glob ([pat="*"], flags)
Find all files in this directory matching a shell pattern.

Parameters:

  • pat string shell glob pattern (default "*")
  • flags currently limited to posix.glob.GLOB_MARK

Returns:

    table matching filenames

See also:

Constants

posix.glob
Glob constants.

Fields:

  • GLOB_MARK int append slashes to matches that are directories.

Usage:

    -- Print glob constants supported on this host.
    for name, value in pairs (require "posix.glob") do
      if type (value) == "number" then
        print (name, value)
      end
    end
generated by LDoc 1.4.6 Last updated 2017-07-09 17:18:06