files

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2022 License: Unlicense Imports: 7 Imported by: 0

Documentation

Overview

Package files is an internal package of twtr/cmd.

It provides helpers to access the file system.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(file string) (io.ReadWriteCloser, error)

Create file with read/write permissions, useful for creating a new twtxt.txt file (or overwriting) to write to.

func Edit

func Edit(file string) error

Edit a file in the system EDITOR, uses VISUAL over EDITOR if set.

Equivalent to:

$ sh -c "${VISUAL:-$EDITOR} <file>"

Returns any errors that occur.

func Exists

func Exists(file string) (bool, error)

Exists reports if the given file exists, or any error that it encounters while checking.

func Open

func Open(file string) (io.ReadWriteCloser, error)

Open file with read/write permissions, useful for opening a twtxt.txt file to write to.

Types

This section is empty.

Jump to

Keyboard shortcuts

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