MCPcopy Create free account
hub / github.com/aboutcode-org/scancode-toolkit / file_extension

Function file_extension

src/commoncode/fileutils.py:231–235  ·  view source on GitHub ↗

Return the file extension for a path.

(path, force_posix=False)

Source from the content-addressed store, hash-verified

229
230
231def file_extension(path, force_posix=False):
232 """
233 Return the file extension for a path.
234 """
235 return splitext(path, force_posix)[1]
236
237
238def splitext_name(file_name, is_file=True):

Callers

nothing calls this directly

Calls 1

splitextFunction · 0.85

Tested by

no test coverage detected