fileutils

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

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

Go to latest
Published: Dec 10, 2014 License: MIT Imports: 7 Imported by: 22

README

go-fileutils

Build Status GoDoc

Documentation

Documentation

Overview

Package fileutils wraps or implements common file operations with familiar function names.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChmodR

func ChmodR(name string, mode os.FileMode) error

ChmodR is like `chmod -R`

func ChownR

func ChownR(path string, uid, gid int) error

ChownR is like `chown -R`

func Cp

func Cp(src, dest string) (err error)

Cp is like `cp`

func CpR

func CpR(source, dest string) (err error)

CpR is like `cp -R`

func CpWithArgs

func CpWithArgs(source, dest string, args CpArgs) (err error)

CpWithArgs is a version of the Cp method that allows the passing of an arguments struct to further modify the copying behavior

func MkdirP

func MkdirP(path string, perm os.FileMode) error

MkdirP is `mkdir -p` / os.MkdirAll

func Mv

func Mv(oldname, newname string) error

Mv is `mv` / os.Rename

func Rm

func Rm(name string) error

Rm is `rm` / os.Remove

func RmRF

func RmRF(path string) error

RmRF is `rm -rf` / os.RemoveAll

func Which

func Which(file string) (string, error)

Which is `which` / exec.LookPath

Types

type CpArgs

type CpArgs struct {
	Recursive       bool
	PreserveLinks   bool
	PreserveModTime bool
}

CpArgs is a list of arguments which can be passed to the CpWithArgs method

Jump to

Keyboard shortcuts

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