fsop

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2023 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Overview

Package fsop has common file system operations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compress

func Compress(fileOrDir string, only Only) ([]byte, error)

Compress will create and zip archive of the file(s) and folder(s) in fileOrDir. fileOrDir may be a single file or a directory containing many files. The returned bytes is the content of the zip archive.

func Copy

func Copy(oldpath, newpath string, only Only) error

Copy the the oldpath to the newpath. If only is not nil, only copy the files and folders where only returns true.

Types

type Only

type Only func(p string) bool

Only takes a path and returns true to include the file or folder.

Jump to

Keyboard shortcuts

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