class Bootsnap::LoadPathCache::Path
def entries_and_dirs(store)
Return a list of all the requirable files and all of the subdirectories
def entries_and_dirs(store) if stable? # the cached_mtime field is unused for 'stable' paths, but is # set to zero anyway, just in case we change the stability heuristics. _, entries, dirs = store.get(expanded_path) return [entries, dirs] if entries # cache hit entries, dirs = scan! store.set(expanded_path, [0, entries, dirs]) return [entries, dirs] end cached_mtime, entries, dirs = store.get(expanded_path) current_mtime = latest_mtime(expanded_path, dirs || []) return [[], []] if current_mtime == -1 # path does not exist return [entries, dirs] if cached_mtime == current_mtime entries, dirs = scan! store.set(expanded_path, [current_mtime, entries, dirs]) [entries, dirs] end