diff options
author | 2016-06-15 08:50:28 -0400 | |
---|---|---|
committer | 2016-06-15 08:50:28 -0400 | |
commit | 465cf8345a38fdb078672c34dbd25c4e89c3dcf6 (patch) | |
tree | 2dc2899d60c0e95a5eb4da4478a783e2fbac9b7c /core/file_io.lua | |
parent | 7150a93bfa47217e4f1f04acec868ab8163b242d (diff) | |
download | textadept-465cf8345a38fdb078672c34dbd25c4e89c3dcf6.tar.gz textadept-465cf8345a38fdb078672c34dbd25c4e89c3dcf6.zip |
Changed some of 'lfs_ext' API.
Renamed `lfs.FILTER` to `lfs.default_filter` and removed `exclude_FILTER`
argument from `lfs.dir_foreach()`.
Diffstat (limited to 'core/file_io.lua')
-rw-r--r-- | core/file_io.lua | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/core/file_io.lua b/core/file_io.lua index 8e252790..bd018e5a 100644 --- a/core/file_io.lua +++ b/core/file_io.lua @@ -370,7 +370,8 @@ io.quick_open_filters = {} -- If *paths* is `nil`, uses the current project's root directory, which is -- obtained from `io.get_project_root()`. -- Files shown in the dialog do not match any pattern in either string or table --- *filter* (or `lfs.FILTER` if *filter* is `nil`). A filter table contains: +-- *filter* (or `lfs.default_filter` if *filter* is `nil`). A filter table +-- contains: -- -- + Lua patterns that match filenames to exclude. -- + Optional `folders` sub-table that contains patterns matching directories @@ -386,16 +387,16 @@ io.quick_open_filters = {} -- not match the pattern that follows. The number of files in the list is capped -- at `quick_open_max`. -- If *filter* is `nil` and *paths* is ultimately a string, the filter from the --- `io.quick_open_filters` table is used in place of `lfs.FILTER` if the former --- exists. +-- `io.quick_open_filters` table is used in place of `lfs.default_filter` if the +-- former exists. -- *opts* is an optional table of additional options for -- `ui.dialogs.filteredlist()`. -- @param paths Optional string directory path or table of directory paths to -- search. The default value is the current project's root directory, if -- available. -- @param filter Optional filter for files and directories to exclude. The --- default value is `lfs.FILTER` unless *paths* is a string and a filter for --- it is defined in `io.quick_open_filters`. +-- default value is `lfs.default_filter` unless *paths* is a string and a +-- filter for it is defined in `io.quick_open_filters`. -- @param opts Optional table of additional options for -- `ui.dialogs.filteredlist()`. -- @usage io.quick_open(buffer.filename:match('^.+/')) -- list all files in the @@ -405,7 +406,7 @@ io.quick_open_filters = {} -- @usage io.quick_open('/project', {folders = {'build'}}) -- list all non-built -- files in a project directory -- @see io.quick_open_filters --- @see lfs.FILTER +-- @see lfs.default_filter -- @see quick_open_max -- @see ui.dialogs.filteredlist -- @name quick_open @@ -422,7 +423,7 @@ function io.quick_open(paths, filter, opts) if #utf8_list >= io.quick_open_max then return false end filename = filename:gsub('^%.[/\\]', '') utf8_list[#utf8_list + 1] = filename:iconv('UTF-8', _CHARSET) - end, filter or lfs.FILTER) + end, filter or lfs.default_filter) end if #utf8_list >= io.quick_open_max then local msg = string.format('%d %s %d', io.quick_open_max, |