juju: github.com/wallyworld/juju/core/paths/transientfile Index | Files

package transientfile

import "github.com/wallyworld/juju/core/paths/transientfile"

Package transientfile provides helpers for creating files that do not survive machine reboots.

Package transientfile provides helpers for creating files that do not survive machine reboots.

Index

Package Files

create.go delete.go

func Create Uses

func Create(transientDir, name string) (*os.File, error)

Create a transient file with the specified name inside transientDir. The function will attempt to create any missing folders leading up to the place where the transient file is to be created.

For *nix targets, the caller is expected to provide a suitable transient directory (e.g. a tmpfs mount) that will be automatically purged after a reboot.

For windows targets, any directory can be specified as transientDir but in order to ensure that the file will get removed, the process must be able to access the windows registry.

Package transientfile imports 3 packages (graph). Updated 2020-05-10. Refresh now. Tools for package owners.