fs

package
v0.20.0-alpha Latest Latest
Warning

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

Go to latest
Published: May 17, 2023 License: Apache-2.0 Imports: 6 Imported by: 17

Documentation

Overview

Package fs contains utilities for interacting with the host filesystem in a docker friendly way TODO(bentheelder): this should be internal

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Copy

func Copy(src, dst string) error

Copy recursively directories, symlinks, files copies from src to dst Copy will make dirs as necessary, and keep file modes Symlinks will be dereferenced similar to `cp -r src dst`

func CopyFile

func CopyFile(src, dst string) (err error)

CopyFile copies a file from src to dst

func IsAbs added in v0.8.0

func IsAbs(hostPath string) bool

IsAbs is like filepath.IsAbs but also considering posix absolute paths to be absolute even if filepath.IsAbs would not This fixes the case of Posix paths on Windows

func TempDir

func TempDir(dir, prefix string) (name string, err error)

TempDir is like os.MkdirTemp, but more docker friendly

Types

This section is empty.

Jump to

Keyboard shortcuts

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