SCons / src / engine / SCons / Scanner / __init__.xml

<?xml version="1.0" encoding="UTF-8"?>

This file is processed by the bin/ module.
See its __doc__ string for a discussion of the format.

<!DOCTYPE sconsdoc [
<!ENTITY % scons SYSTEM '../../../../doc/scons.mod'>
<!ENTITY % builders-mod SYSTEM '../../../../doc/generated/builders.mod'>
<!ENTITY % functions-mod SYSTEM '../../../../doc/generated/functions.mod'>
<!ENTITY % tools-mod SYSTEM '../../../../doc/generated/tools.mod'>
<!ENTITY % variables-mod SYSTEM '../../../../doc/generated/variables.mod'>

<sconsdoc xmlns=""
          xsi:schemaLocation=" scons.xsd">

<scons_function name="FindPathDirs">
<arguments signature="global">
Returns a function
(actually a callable Python object)
intended to be used as the
of a Scanner object.
The returned object will look up the specified
in a construction environment
and treat the construction variable's value as a list of
directory paths that should be searched

Note that use of
is generally preferable to
writing your own
for the following reasons:
1) The returned list will contain all appropriate directories
found in source trees
is used)
or in code repositories
or the
option are used).
2) scons will identify expansions of
that evaluate to the same list of directories as,
in fact, the same list,
and avoid re-scanning the directories for files,
when possible.


def my_scan(node, env, path, arg):
    # Code to scan file contents goes here...
    return include_files

scanner = Scanner(name = 'myscanner',
                  function = my_scan,
                  path_function = FindPathDirs('MYPATH'))

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.