fileutil

package
v0.0.0-...-3518944 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2017 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package fileutil contains small utility functions for working with files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DirExists

func DirExists(filename string) bool

FileExists returns true iff a directory exists at the given path.

func Exists

func Exists(filename string) (exists bool, isDir bool)

Exists returns wheter an item at the given path exists and if it's a directory.

func FileExists

func FileExists(filename string) bool

FileExists returns true iff a file exists at the given path and it's not a directory.

func WriteFile

func WriteFile(filename string, data []byte, overwrite bool, perm os.FileMode) error

WriteFile writes the given data to the file named by filename. If the file already exists and overwrite is false, it will return an error. If filename is empty or the string "-" it will write to os.Stdout.

Types

This section is empty.

Jump to

Keyboard shortcuts

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