package
1.0.5
Repository: https://github.com/nandlabs/golly.git
Documentation: pkg.go.dev

# README

Virtual File System (VFS) Package

The VFS package provides a unified api for accessing multiple file system. It is extensible and new implementation can be easily plugged in.

The default package has methods for local file system.



Installation

go get oss.nandlabs.io/golly/vfs

Usage

A simple usage of the library to create a directory in the OS.

package main

import (
    "fmt"
    "oss.nandlabs.io/golly/vfs"
)

var (
    testManager = GetManager()
)

func GetRawPath(input string) (output string) {
    currentPath, _ := os.Getwd()
    u, _ := url.Parse(input)
    path := currentPath + u.Path
    output = u.Scheme + "://" + path
    return
}

func main() {
    u := GetRawPath("file:///test-data")
    _, err := testManager.MkdirRaw(u)
    if err != nil {
       fmt.Errorf("MkdirRaw() error = %v", err)
    }
}