porting

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2022 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Overview

package porting deals with importing and exporting to and from gotfs

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache = state.KVStore[string, Entry]

type Entry

type Entry struct {
	ModifiedAt tai64.TAI64N `json:"mtime"`
	Root       gotfs.Root   `json:"root"`
}

type Exporter added in v0.0.3

type Exporter struct {
	// contains filtered or unexported fields
}

func NewExporter added in v0.0.3

func NewExporter(gotfs *gotfs.Operator, cache Cache, fsx posixfs.FS) *Exporter

func (*Exporter) ExportFile added in v0.0.3

func (pr *Exporter) ExportFile(ctx context.Context, ms, ds cadata.Store, root gotfs.Root, p string) error

type Importer added in v0.0.3

type Importer struct {
	// contains filtered or unexported fields
}

func NewImporter added in v0.0.3

func NewImporter(fsop *gotfs.Operator, cache state.KVStore[string, Entry], ms, ds cadata.Store) *Importer

func (*Importer) ImportFile added in v0.0.3

func (pr *Importer) ImportFile(ctx context.Context, fsx posixfs.FS, p string) (*gotfs.Root, error)

func (*Importer) ImportPath added in v0.0.3

func (pr *Importer) ImportPath(ctx context.Context, fsx posixfs.FS, p string) (*gotfs.Root, error)

ImportPath returns gotfs instance containing the content in fsx at p. The content will be at the root of the filesystem.

Jump to

Keyboard shortcuts

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