Categorygithub.com/gflydev/storage/local
module
1.1.2
Repository: https://github.com/gflydev/storage.git
Documentation: pkg.go.dev

# README

gFly Local Storage

Usage

Install

# Storage
go get -u github.com/gflydev/[email protected]

# Local Storage
go get -u github.com/gflydev/storage/[email protected]

Quick usage main.go

import (
    "github.com/gflydev/core"
    "github.com/gflydev/storage"
    storageLocal "github.com/gflydev/storage/local"	
)

func main() {
    // Register Local storage
    storage.Register(storageLocal.Type, storageLocal.New())

    // Create file storage with default
    fs := storage.Instance()

	// Create folder `foo/bar` and add file `hello.txt`
    if ok := fs.MakeDir("foo/bar"); ok {
        fs.Put("foo/bar/hello.txt", "Hello world")
    }
}