dirutils

package
v0.0.0-...-ae309c6 Latest Latest
Warning

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

Go to latest
Published: May 13, 2013 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Utilities for managing directories/files

Index

Constants

View Source
const (
	ObjectDir   = ".svc"
	Permissions = 0777
)

Variables

This section is empty.

Functions

func DeleteIfEmpty

func DeleteIfEmpty(dir string) error

DeleteIfEmpty deletes a directory if the contents are empty

func GetCurrentDirectory

func GetCurrentDirectory() (string, *os.File, error)

GetCurrentDirectory returns a *File to the current directory

func GetDirectoryContents

func GetDirectoryContents(dir *os.File) ([]os.FileInfo, error)

GetDirectoryContents returns a slice of files/folders in dir

func InitializeRepo

func InitializeRepo()

InitializeRepo creates new object directory

func OpenRepo

func OpenRepo() (*os.File, error)

OpenRepo returns a *File to the current repo base directory

func RecursivelyCheckForRepo

func RecursivelyCheckForRepo(file *os.File) (found bool, dir string)

Check parent directories until root for existing repo. Probably a more elegant way to do this.

func RemoveRepo

func RemoveRepo() error

RemoveRepo deletes the current repo's metadata, leaving working files.

Types

This section is empty.

Jump to

Keyboard shortcuts

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