MCPcopy Index your code
hub / github.com/emscripten-core/emsdk / path_points_to_directory

Function path_points_to_directory

emsdk.py:595–609  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

593# 'a/b/c' points to directory, so does 'a/b/c/', but 'a/b/c.x' is parsed as a
594# filename
595def path_points_to_directory(path):
596 if path == '.':
597 return True
598 last_slash = max(path.rfind('/'), path.rfind('\\'))
599 last_dot = path.rfind('.')
600 no_suffix = last_dot < last_slash or last_dot == -1
601 if no_suffix:
602 return True
603 suffix = path[last_dot:]
604 # Very simple logic for the only file suffixes used by emsdk downloader. Other
605 # suffixes, like 'clang-3.2' are treated as dirs.
606 if suffix in {'.exe', '.zip', '.txt'}:
607 return False
608 else:
609 return True
610
611
612def get_content_length(download):

Callers 2

get_download_targetFunction · 0.85
installation_dirMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected