MCPcopy Create free account
hub / github.com/conda/constructor / getsize

Function getsize

constructor/fcp.py:51–62  ·  view source on GitHub ↗

Return the size of a file, reported by os.lstat as opposed to os.stat.

(filename)

Source from the content-addressed store, hash-verified

49
50
51def getsize(filename):
52 """Return the size of a file, reported by os.lstat as opposed to os.stat."""
53 # Symlinks might be reported as "not found" if they are provided by a
54 # package's dependencies
55 # We use lstat to obtain the size of the symlink, as opposed to the
56 # size of the file it points to
57 # From the docstring of the os.lstat function
58 # > On platforms that do not support symbolic links, this is an
59 # > alias for stat().
60 # https://github.com/conda/constructor/issues/311
61 # https://docs.python.org/3/library/os.html
62 return os.lstat(filename).st_size
63
64
65def warn_menu_packages_missing(precs, menu_packages):

Callers 2

check_duplicates_filesFunction · 0.85
get_headerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected