class Bootsnap::LoadPathCache::Path

def entries_and_dirs(store)

Experimental RBS support (using type sampling data from the type_fusion project).

type Bootsnap__LoadPathCache__Path_entries_and_dirs_return_value = Array[Array, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String] | Array[Array, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String] | Array[Array, String, String] | Array[Array, String] | Array[Array, String, String, String, String, String, String, String, String, String, String, String, String, String, String] | Array[Array, String, String, String, String, String] | Array[Array, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String] | Array[Array, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String] | Array[Array, String, String, String, String, String, String, String, String, String]

def entries_and_dirs: (Bootsnap::LoadPathCache::Store store) -> Bootsnap__LoadPathCache__Path_entries_and_dirs_return_value

This signature was generated using 38 samples from 3 applications.

of this +Path+.
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