package fileutils

import "github.com/docker/docker/pkg/fileutils"

Index

Functions

func CopyFile

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

CopyFile copies from src to dst until either EOF is reached on src or an error occurs. It verifies src exists and removes the dst if it exists.

func CreateIfNotExists

func CreateIfNotExists(path string, isDir bool) error

CreateIfNotExists creates a file or a directory only if it does not already exist.

func ReadSymlinkedDirectory

func ReadSymlinkedDirectory(path string) (realPath string, err error)

ReadSymlinkedDirectory returns the target directory of a symlink. The target of the symbolic link may not be a file.

Source Files

fileutils.go

Version
v25.0.0-beta.3+incompatible
Published
Dec 20, 2023
Platform
js/wasm
Imports
4 packages
Last checked
29 minutes ago

Tools for package owners.