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

Function file_name

src/commoncode/fileutils.py:204–208  ·  view source on GitHub ↗

Return the file name (or directory name) of a path.

(path, force_posix=False)

Source from the content-addressed store, hash-verified

202
203
204def file_name(path, force_posix=False):
205 """
206 Return the file name (or directory name) of a path.
207 """
208 return resource_name(path, force_posix)
209
210
211def parent_directory(path, force_posix=False, with_trail=True):

Callers 10

get_templateFunction · 0.90
build_package_nameFunction · 0.90
load_dataMethod · 0.90
_create_root_resourceMethod · 0.90
_populateMethod · 0.90
fixed_width_file_nameFunction · 0.90
is_credits_fileFunction · 0.90
walkFunction · 0.85

Calls 1

resource_nameFunction · 0.85

Tested by

no test coverage detected