cdup

package module
v0.0.0-...-f8aee62 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 25, 2021 License: MIT Imports: 5 Imported by: 1

README

Package cdup implements searching for a file (or directory) in all parents of a given directory. This frequently comes up for files whose presence marks all subdirectories as part of a coherent whole, such as go.mod for Go modules or .git for git repositories.

MIT license.

Documentation

Overview

Package cdup implements searching for a file (or directory) in all parents of a given directory. This frequently comes up for files whose presence marks all subdirectories as part of a coherent whole, such as go.mod for Go modules or .git for git repositories.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Find

func Find(dir, name string) (parent string, err error)

Find searches dir and all its ancestors directories for a file (or directory) named name. It returns the most recent ancestor of dir that contains name.

func FindIn

func FindIn(fsys fs.FS, dir, name string) (parent string, err error)

FindIn searches dir and all its ancestors directories for a file (or directory) named name. It returns the most recent ancestor of dir that contains name.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL