MCPcopy Index your code
hub / github.com/pydata/xarray / _get_mtime

Function _get_mtime

xarray/backends/api.py:94–107  ·  view source on GitHub ↗
(filename_or_obj)

Source from the content-addressed store, hash-verified

92
93
94def _get_mtime(filename_or_obj):
95 # if passed an actual file path, augment the token with
96 # the file modification time
97 mtime = None
98
99 try:
100 path = os.fspath(filename_or_obj)
101 except TypeError:
102 path = None
103
104 if path and not is_remote_uri(path):
105 mtime = os.path.getmtime(os.path.expanduser(filename_or_obj))
106
107 return mtime
108
109
110def _protect_dataset_variables_inplace(dataset: Dataset, cache: bool) -> None:

Callers 1

_chunk_dsFunction · 0.85

Calls 1

is_remote_uriFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…