dSearchPath.I 1.4 KB

12345678910111213141516171819202122232425262728293031323334
  1. // Filename: dSearchPath.I
  2. // Created by: drose (01Jul00)
  3. //
  4. ////////////////////////////////////////////////////////////////////
  5. //
  6. // PANDA 3D SOFTWARE
  7. // Copyright (c) 2001 - 2004, Disney Enterprises, Inc. All rights reserved
  8. //
  9. // All use of this software is subject to the terms of the Panda 3d
  10. // Software license. You should have received a copy of this license
  11. // along with this source code; you will also find a current copy of
  12. // the license at http://etc.cmu.edu/panda3d/docs/license/ .
  13. //
  14. // To contact the maintainers of this program write to
  15. // [email protected] .
  16. //
  17. ////////////////////////////////////////////////////////////////////
  18. ////////////////////////////////////////////////////////////////////
  19. // Function: DSearchPath::search_path
  20. // Access: Public, Static
  21. // Description: A quick-and-easy way to search a searchpath for a
  22. // file when you don't feel like building or keeping
  23. // around a DSearchPath object. This simply
  24. // constructs a temporary DSearchPath based on the
  25. // indicated path string, and searches that.
  26. ////////////////////////////////////////////////////////////////////
  27. INLINE Filename DSearchPath::
  28. search_path(const Filename &filename, const string &path,
  29. const string &delimiters) {
  30. DSearchPath search(path, delimiters);
  31. return search.find_file(filename);
  32. }