Skip to content
This repository has been archived by the owner on Dec 9, 2023. It is now read-only.

tomjridge/find-parent-dir

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Finding containing directories

This package provides utilities for examining parent directories. As an example, git looks for a .git directory in any parent directory of the current directory. That would be expressed here as:

(find-parent-containing (current-directory) ".git")

Exports

(find-parent-containing [start path-string?] [sentinel path-string?]) -> (or/c #f path?)

Finds a parent directory of start that contains sentinel, or returns #f.

(find-parent-dir [start path-string?] [pred (-> path? any)]) -> (or/c #f path?)

Finds a parent directory of start that matches pred or returns #f.

Originally by @offby1 here: https://gist.github.com/offby1/6862232

About

Finding containing directories

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Scheme 96.2%
  • Racket 3.8%