DSearchPath

from panda3d.core import DSearchPath
class DSearchPath

Bases: DTOOL_SUPER_BASE

This class stores a list of directories that can be searched, in order, to locate a particular file. It is normally constructed by passing it a traditional searchpath-style string, e.g. a list of directory names delimited by spaces or colons, but it can also be built up explicitly.

Inheritance diagram

Inheritance diagram of DSearchPath

class Results

Bases: DTOOL_SUPER_BASE

__init__(*args, **kwargs)
assign()

C++ Interface: assign(const Results self, const Results copy)

clear()

C++ Interface: clear(const Results self)

/**
  • Removes all the files from the list.

*/

getFile()

C++ Interface: get_file(Results self, int n)

/**
  • Returns the nth file on the result list.

*/

getNumFiles()

C++ Interface: get_num_files(Results self)

/**
  • Returns the number of files on the result list.

*/

get_file()

C++ Interface: get_file(Results self, int n)

/**
  • Returns the nth file on the result list.

*/

get_num_files()

C++ Interface: get_num_files(Results self)

/**
  • Returns the number of files on the result list.

*/

output()

C++ Interface: output(Results self, ostream out)

/**

*/

write()

C++ Interface: write(Results self, ostream out, int indent_level)

/**

*/

__init__(*args, **kwargs)
appendDirectory()

C++ Interface: append_directory(const DSearchPath self, const Filename directory)

/**
  • Adds a new directory to the end of the search list.

*/

appendPath()

C++ Interface: append_path(const DSearchPath self, str path, str separator) append_path(const DSearchPath self, const DSearchPath path)

/**
  • Adds all of the directories listed in the search path to the end of the

  • search list.

*/

/**
  • Adds all of the directories listed in the search path to the end of the

  • search list.

*/

append_directory()

C++ Interface: append_directory(const DSearchPath self, const Filename directory)

/**
  • Adds a new directory to the end of the search list.

*/

append_path()

C++ Interface: append_path(const DSearchPath self, str path, str separator) append_path(const DSearchPath self, const DSearchPath path)

/**
  • Adds all of the directories listed in the search path to the end of the

  • search list.

*/

/**
  • Adds all of the directories listed in the search path to the end of the

  • search list.

*/

assign()

C++ Interface: assign(const DSearchPath self, const DSearchPath copy)

clear()

C++ Interface: clear(const DSearchPath self)

/**
  • Removes all the directories from the search list.

*/

directories
findAllFiles()

C++ Interface: find_all_files(DSearchPath self, const Filename filename) find_all_files(DSearchPath self, const Filename filename, Results results)

/**
  • This variant of find_all_files() returns the new Results object, instead of

  • filling on in on the parameter list. This is a little more convenient to

  • call from Python.

*/

/**
  • Searches all the directories in the search list for the indicated file, in

  • order. Fills up the results list with all of the matching filenames

  • found, if any. Returns the number of matches found.

  • It is the responsibility of the the caller to clear the results list first;

  • otherwise, the newly-found files will be appended to the list.

*/

findFile()

C++ Interface: find_file(DSearchPath self, const Filename filename)

/**
  • Searches all the directories in the search list for the indicated file, in

  • order. Returns the full matching pathname of the first match if found, or

  • the empty string if not found.

*/

find_all_files()

C++ Interface: find_all_files(DSearchPath self, const Filename filename) find_all_files(DSearchPath self, const Filename filename, Results results)

/**
  • This variant of find_all_files() returns the new Results object, instead of

  • filling on in on the parameter list. This is a little more convenient to

  • call from Python.

*/

/**
  • Searches all the directories in the search list for the indicated file, in

  • order. Fills up the results list with all of the matching filenames

  • found, if any. Returns the number of matches found.

  • It is the responsibility of the the caller to clear the results list first;

  • otherwise, the newly-found files will be appended to the list.

*/

find_file()

C++ Interface: find_file(DSearchPath self, const Filename filename)

/**
  • Searches all the directories in the search list for the indicated file, in

  • order. Returns the full matching pathname of the first match if found, or

  • the empty string if not found.

*/

getDirectories()
getDirectory()

C++ Interface: get_directory(DSearchPath self, int n)

/**
  • Returns the nth directory on the search list.

*/

getNumDirectories()

C++ Interface: get_num_directories(DSearchPath self)

/**
  • Returns the number of directories on the search list.

*/

get_directories()
get_directory()

C++ Interface: get_directory(DSearchPath self, int n)

/**
  • Returns the nth directory on the search list.

*/

get_num_directories()

C++ Interface: get_num_directories(DSearchPath self)

/**
  • Returns the number of directories on the search list.

*/

isEmpty()

C++ Interface: is_empty(DSearchPath self)

/**
  • Returns true if the search list is empty, false otherwise.

*/

is_empty()

C++ Interface: is_empty(DSearchPath self)

/**
  • Returns true if the search list is empty, false otherwise.

*/

output()

C++ Interface: output(DSearchPath self, ostream out, str separator)

/**

*/

prependDirectory()

C++ Interface: prepend_directory(const DSearchPath self, const Filename directory)

/**
  • Adds a new directory to the front of the search list.

*/

prependPath()

C++ Interface: prepend_path(const DSearchPath self, const DSearchPath path)

/**
  • Adds all of the directories listed in the search path to the beginning of

  • the search list.

*/

prepend_directory()

C++ Interface: prepend_directory(const DSearchPath self, const Filename directory)

/**
  • Adds a new directory to the front of the search list.

*/

prepend_path()

C++ Interface: prepend_path(const DSearchPath self, const DSearchPath path)

/**
  • Adds all of the directories listed in the search path to the beginning of

  • the search list.

*/

searchPath()

C++ Interface: search_path(const Filename filename, str path, str separator)

/**
  • A quick-and-easy way to search a searchpath for a file when you don’t feel

  • like building or keeping around a DSearchPath object. This simply

  • constructs a temporary DSearchPath based on the indicated path string, and

  • searches that.

*/

search_path()

C++ Interface: search_path(const Filename filename, str path, str separator)

/**
  • A quick-and-easy way to search a searchpath for a file when you don’t feel

  • like building or keeping around a DSearchPath object. This simply

  • constructs a temporary DSearchPath based on the indicated path string, and

  • searches that.

*/

write()

C++ Interface: write(DSearchPath self, ostream out, int indent_level)

/**

*/