0.1.21 • Published 3 months ago

@flownet/lib-list-files v0.1.21

Weekly downloads
-
License
MIT
Repository
gitlab
Last release
3 months ago

@fnet/list-files

The @fnet/list-files module is a code project intended for the synchronization and organization of matched files within a specified directory. The operation and functionality of the code are based on a set of predefined patterns or a customizable pattern that matches files in a designated directory.

Main Purpose and Functionality

The main purpose of the @fnet/list-files module is to provide an effective way to search for and match files in a specified directory. The code utilizes an object that defines the directory to search in, the pattern or patterns to match files against, excluding directories from the results, and the inclusion of hidden files.

The primary function of this code is performed by the index function. It takes an object as an argument, where the object potentially contains four properties: dir, pattern, nodir, and dot.

  • dir: This specifies the directory where the search is to take place. If there is no directory specified, the search takes place in the current working directory by default.
  • pattern: This is an essential feature as it determines the criteria for file matching. The input could either be a single pattern or an array of patterns. If no pattern is specified, the default pattern used is "*". Therefore, without a specific input, all files in the designated directory will be included in the search results.
  • nodir: This option determines whether directories should be excluded from the results. Its default value is false, meaning directories are included.
  • dot: This option decides if hidden files should be included in the search results. By default, this is set to false indicating that hidden files are excluded.

These properties are packaged as options and interfaced with the globSync function to achieve the task of finding matching files in the designated directory. The returned result from this function is an array of matched file paths.

In essence, the @fnet/list-files code proves useful in simplifying file organization and ensuring easy file matching based on specific parameters. It leverages the glob-based pattern matching to give users control and flexibility over file searches within their directories.

0.1.21

3 months ago

0.1.20

3 months ago

0.1.17

3 months ago

0.1.18

3 months ago

0.1.19

3 months ago

0.1.16

8 months ago

0.1.15

8 months ago

0.1.14

9 months ago

0.1.13

9 months ago

0.1.12

9 months ago

0.1.11

10 months ago

0.1.10

10 months ago

0.1.9

10 months ago

0.1.8

10 months ago

0.1.7

10 months ago

0.1.6

10 months ago

0.1.5

10 months ago

0.1.4

10 months ago

0.1.3

10 months ago

0.1.2

10 months ago

0.1.1

10 months ago