file

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2023 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BaseName

func BaseName(s string) string

BaseName normalizes a given string to use it as a safe filename

func ChangeFileTimes added in v0.15.0

func ChangeFileTimes(dir, name string, ctime, mtime time.Time) error

ChangeFileTimes matches the file times with the Evernote metadata

Uses touch if available to change both creation and modification date Otherwise it falls back to os.Chtimes to change only the modification date

func Save

func Save(dir, name string, content io.Reader) error

Save a new file in a given dir with the following content. Creates a directory if necessary.

Types

This section is empty.

Jump to

Keyboard shortcuts

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