MCPcopy
hub / github.com/django/django / find

Method find

django/contrib/staticfiles/finders.py:233–249  ·  view source on GitHub ↗

Look for files in the default file storage, if it's local.

(self, path, find_all=False)

Source from the content-addressed store, hash-verified

231 super().__init__(*args, **kwargs)
232
233 def find(self, path, find_all=False):
234 """
235 Look for files in the default file storage, if it's local.
236 """
237 try:
238 self.storage.path("")
239 except NotImplementedError:
240 pass
241 else:
242 if self.storage.location not in searched_locations:
243 searched_locations.append(self.storage.location)
244 if self.storage.exists(path):
245 match = self.storage.path(path)
246 if find_all:
247 match = [match]
248 return match
249 return []
250
251 def list(self, ignore_patterns):
252 """

Callers

nothing calls this directly

Calls 3

pathMethod · 0.45
appendMethod · 0.45
existsMethod · 0.45

Tested by

no test coverage detected