fsstatus

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2015 License: Apache-2.0 Imports: 11 Imported by: 2

Documentation

Overview

fsstatus provides utility functions for querying several aspects of the filesystem, especially as pertains to monitoring.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Checksum

func Checksum(algorithm string, data []byte) (checksum string, err error)

Checksum returns the checksum of some data, using a specified algorithm. It only returns an error when an invalid algorithm is used. The valid ones are MD5, SHA1, SHA224, SHA256, SHA384, SHA512, SHA3224, SHA3256, SHA3384, and SHA3512.

func FileHasPermissions

func FileHasPermissions(expectedPerms string, path string) (bool, error)

FileHasPermissions checks to see whether the file/directory/etc. at the given path has the given permissions (of the format -rwxrwxrwx)

func IsDirectory

func IsDirectory(path string) (bool, error)

IsDirectory checks to see if there's a regular ol' directory at path.

func IsFile

func IsFile(path string) (bool, error)

IsFile checks to see if there's a regular ol' file at path.

func IsSymlink(path string) (bool, error)

IsSymlink checks to see if there's a symlink at path.

Types

This section is empty.

Jump to

Keyboard shortcuts

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