MCPcopy Index your code
hub / github.com/sqlmapproject/sqlmap / lookup

Method lookup

thirdparty/bottle/bottle.py:3104–3119  ·  view source on GitHub ↗

Search for a resource and return an absolute file path, or `None`. The :attr:`path` list is searched in order. The first match is returned. Symlinks are followed. The result is cached to speed up future lookups.

(self, name)

Source from the content-addressed store, hash-verified

3102 else: yield full
3103
3104 def lookup(self, name):
3105 """ Search for a resource and return an absolute file path, or `None`.
3106
3107 The :attr:`path` list is searched in order. The first match is
3108 returned. Symlinks are followed. The result is cached to speed up
3109 future lookups. """
3110 if name not in self.cache or DEBUG:
3111 for path in self.path:
3112 fpath = os.path.join(path, name)
3113 if os.path.isfile(fpath):
3114 if self.cachemode in ('all', 'found'):
3115 self.cache[name] = fpath
3116 return fpath
3117 if self.cachemode == 'all':
3118 self.cache[name] = None
3119 return self.cache[name]
3120
3121 def open(self, name, mode='r', *args, **kwargs):
3122 """ Find a resource and return a file object, or raise IOError. """

Callers 11

openMethod · 0.95
_toprettyxml_nodeFunction · 0.80
_codecMethod · 0.80
checkCharEncodingFunction · 0.80
_cleanupOptionsFunction · 0.80
checkSystemEncodingFunction · 0.80
dirtyPatchesFunction · 0.80
_codecs_openFunction · 0.80
settings.pyFile · 0.80
getBytesFunction · 0.80
stdoutEncodeFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected