package fileutils
import "github.com/docker/docker/pkg/fileutils"
Index ¶
- func CopyFile(src, dst string) (int64, error)
- func CreateIfNotExists(path string, isDir bool) error
- func GetTotalUsedFds() int
- func ReadSymlinkedDirectory(path string) (realPath string, err error)
Functions ¶
func CopyFile ¶
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 ¶
CreateIfNotExists creates a file or a directory only if it does not already exist.
func GetTotalUsedFds ¶
func GetTotalUsedFds() int
GetTotalUsedFds returns the number of used File Descriptors by executing "lsof -lnP -Ff -p PID".
It uses the "-F" option to only print file-descriptors (f), and the "-l", "-n", and "-P" options to omit looking up user-names, host-names, and port- names. See LSOF(8).
func ReadSymlinkedDirectory ¶
ReadSymlinkedDirectory returns the target directory of a symlink. The target of the symbolic link may not be a file.
Source Files ¶
fileutils.go fileutils_darwin.go
- Version
- v27.0.3+incompatible
- Published
- Jun 28, 2024
- Platform
- darwin/amd64
- Imports
- 7 packages
- Last checked
- 15 minutes ago –
Tools for package owners.