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

# README

gFly Storage - File system

Copyright © 2023, gFly
https://www.gfly.dev
All rights reserved.

gFly 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"
    // Auto initial local storage
    _ "github.com/gflydev/storage/local"	
)

func main() {
    // 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")
    }
}

# Packages

No description provided by the author
No description provided by the author

# Functions

Instance receive a storage instance.
Register add storage instance via unique name Each storage type which implement IStorage interface should be registered by calling method.

# Interfaces

IStorage Storage interface.

# Type aliases

No description provided by the author