Skip to main content

Find files in parent directories

Project description

What is this?

A simple function for walking up a file directory until a certain file is found.

JavaScript version:

const { walkUpUntil } = require("walk_up")

let filepath = walkUpUntil("package.json")

Python version:

from walk_up import walk_up_until

filepath = walk_up_until("requirements.txt")

Ruby version:

require "walk_up"

require_relative walk_up_until("globals.rb") # <- will keep looking in parent directories for a "globals.rb" file

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

walk_up-0.1.0.tar.gz (1.9 kB view hashes)

Uploaded Source

Built Distribution

walk_up-0.1.0-py3-none-any.whl (1.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page