sys

package
v0.0.0-...-e92691c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 11, 2019 License: MIT Imports: 5 Imported by: 0

README

In Memory File System

File System

The filesystem type is a bit specific, as it is a map with key type string and value type *zip.File, I'd like to expand this later, but for now this is all I need.

Manager

File manager is a thin wrapper over aws sdk's s3manager uploader and downloader, meant to be used with mem.File

Mem

mem.File is an in memory file that satisfies the io.WriterAt and io.ReaderAt interfaces. The s3manager uploader and downloader usually read directly from a file pointer and this was created when there is very little disk space to work with (ex: AWS Lambda functions)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileSystem

type FileSystem map[string]*zip.File

FileSystem represents an in memory file system

func Unzip

func Unzip(file *mem.File) (FileSystem, error)

Unzip a file into a FileSystem type

func (FileSystem) FilesWithPrefix

func (fs FileSystem) FilesWithPrefix(prefix string) []*zip.File

FilesWithPrefix return all files with the given prefix

func (FileSystem) OpenFile

func (fs FileSystem) OpenFile(name string) (*mem.File, error)

OpenFile copies uncompressed contents into memfile

func (FileSystem) Remove

func (fs FileSystem) Remove(name string)

Remove removes element from map

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL