porting

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2021 License: GPL-3.0 Imports: 12 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 interface {
	Put(p string, ent Entry) error
	Get(p string) (*Entry, error)
}

type Entry

type Entry struct {
	ModifiedAt int64
	Root       gotfs.Root
}

type Porter

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

func NewPorter

func NewPorter(fsop *gotfs.Operator, pfs posixfs.FS, cache Cache) Porter

func (*Porter) ExportFile

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

func (*Porter) ImportFile

func (pr *Porter) ImportFile(ctx context.Context, ms, ds cadata.Store, p string) (*gotfs.Root, error)

ImportFile returns a gotfs.Root with the content from the file in fsx at p.

func (*Porter) ImportPath

func (pr *Porter) ImportPath(ctx context.Context, ms, ds cadata.Store, 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