osutil

package
v0.0.0-...-8cba18c Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2021 License: MIT Imports: 8 Imported by: 1

README

go-common/osutil

This repository contains the go-common/osutil library.

To install:

go get github.com/ugorji/go-common/osutil

Package Documentation

Package osutil provides utilities functions for the operating system.

Exported Package API

func AbsPath(path string) (abspath string, err error)
func ChkDir(dir string) (exists, isDir bool, err error)
func CopyFile(dest, src string, createDirs bool) (err error)
func CopyFileToWriter(dest io.Writer, src string) (err error)
func IsTerminal(fd int) bool
func MkDir(dir string) (err error)
func OpenInApplication(uri string) error
func SymlinkTarget(fi os.FileInfo, fpath string) (fpath2 string, changed bool, err error)
func WriteFile(dest string, contents []byte, createDirs bool) (err error)

Documentation

Overview

Package osutil provides utilities functions for the operating system.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AbsPath

func AbsPath(path string) (abspath string, err error)

func ChkDir

func ChkDir(dir string) (exists, isDir bool, err error)

func CopyFile

func CopyFile(dest, src string, createDirs bool) (err error)

func CopyFileToWriter

func CopyFileToWriter(dest io.Writer, src string) (err error)

func IsTerminal

func IsTerminal(fd int) bool

func MkDir

func MkDir(dir string) (err error)

Mkdir creates a directory.

func OpenInApplication

func OpenInApplication(uri string) error

func SymlinkTarget

func SymlinkTarget(fi os.FileInfo, fpath string) (fpath2 string, changed bool, err error)

func WriteFile

func WriteFile(dest string, contents []byte, createDirs bool) (err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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