archivefs

package module
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2024 License: MPL-2.0 Imports: 1 Imported by: 0

README

archivefs

Implementations of Go's io/fs.FS interface for various archive types.

Supported Archive Types

Usage

package main

import (
  "log"
  "os"

  "github.com/dpeckett/archivefs/tarfs"
)

func main() {
  f, err := os.Open("example.tar")
  if err != nil {
    log.Fatal(err)
  }
  defer f.Close()

  fsys, err := tarfs.Open(f)
  if err != nil {
    log.Fatal(err)
  }

  // Do something with the filesystem.
}

License

This project is licensed under the Mozilla Public License 2.0 - see the LICENSE file for details.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ReadLinkFS

type ReadLinkFS interface {
	fs.FS

	// ReadLink returns the destination of the named symbolic link.
	ReadLink(name string) (string, error)

	// StatLink returns a FileInfo describing the file without following any symbolic links.
	StatLink(name string) (fs.FileInfo, error)
}

ReadLinkFS is the interface that a file system must implement to support the ReadLink and StatLink methods. This is an experimental implementation of the API described in: https://github.com/golang/go/issues/49580

Directories

Path Synopsis
Package erofs provides the ability to access the contents in an EROFS [1] image.
Package erofs provides the ability to access the contents in an EROFS [1] image.
internal

Jump to

Keyboard shortcuts

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