All Projects → bfontaine → vanish

bfontaine / vanish

Licence: MIT license
✨ Temporary files and directories made easy

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to vanish

up10.me
up10.me file storage site which only store data given data one day
Stars: ✭ 22 (-18.52%)
Mutual labels:  temporary-files
laravel-ovh
Wrapper for OVH Object Storage integration with laravel
Stars: ✭ 30 (+11.11%)
Mutual labels:  temporary-files

Vanish

Vanish is a minimal Go library to use temporary files and directories.

GoDoc Build Status

Install

go get github.com/bfontaine/vanish/v2

Usage

Vanish works with functions:

package main

import "github.com/bfontaine/vanish/v2"

vanish.File(func(name string) {
    // 'name' is a temporary file, use it here as you want, it’ll be deleted
    // at the end of the function
})

vanish.Dir(func(name string) {
    // here, 'name' is a directory
})

vanish.Env(func() {
    // we can modify the environment here, it’ll be restored at the end of the
    // function
})
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].