sqlarfs

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package sqlarfs provides an implementation of io/fs.FS for SQLite Archive Files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FS

type FS interface {
	fs.FS
	fs.StatFS
	fs.ReadDirFS
}

FS documents the io/fs interfaces provided by this implementation of io/fs.FS.

func New

func New(db *sql.DB, opts ...Option) FS

New returns an instance of io/fs.FS that allows to access the files in a SQLite Archive File opened with database/sql.

The default permission mask used to enforce file permissions (mode column in the sqlar table) is PermAny.

type Option

type Option interface {
	// contains filtered or unexported methods
}

type PermMask

type PermMask uint32

PermMask is a permission mask for enforcing fs.FileMode permissions in a SQLite Archive File.

PermMask is an Option for New.

const (
	PermOwner  PermMask = 0700
	PermGroup  PermMask = 0070
	PermOthers PermMask = 0007
	PermAny    PermMask = 0777 // Allow to read (traverse for directories) any file that have at least one permission bit for either owner/group/others
)

Jump to

Keyboard shortcuts

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