io

package
v0.0.0-...-ece29da Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package io provides some helpful IO functions with simplified signatures in the context of eclectica package

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateDir

func CreateDir(path string) (string, error)

CreateDir creates dir with predefined perms

func ExtractVersion

func ExtractVersion(file string) (string, error)

ExtractVersion from the string

func FindDotFile

func FindDotFile(args ...interface{}) (versionPath string, err error)

FindDotFile finds file up in the filesystem tree by provided list of possible files

func GetVersion

func GetVersion(args ...interface{}) (version, path string, err error)

GetVersion finds a file by provided argument and extracts the version defined in it

func ListVersions

func ListVersions(path string) (vers []string)

ListVersions lists installed versions for the given path

func Read

func Read(path string) string

Read file and return a content string

func Symlink(current, base string) (err error)

Symlink removes the link if file already present and the creates another symlink

func WriteFile

func WriteFile(path, content string) error

WriteFile writes file with default perms and accepts a string as data

Types

type Walker

type Walker func(path string) bool

Walker signature function

Jump to

Keyboard shortcuts

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