fs

package
v0.0.0-...-ffb41f7 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2022 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const NOPARENT_ID = 0xFFFFFFFF

Variables

This section is empty.

Functions

func NewDeviceFSRoot

func NewDeviceFSRoot(d *mtp.Device, storages []uint32, options DeviceFsOptions) (*rootNode, error)

DeviceFs is a simple filesystem interface to an MTP device. It must be mounted as SingleThread to make sure it is threadsafe. The file system assumes the device does not touch the storage. Arguments are the opened MTP device and a directory for the backing store.

func SanitizeDosName

func SanitizeDosName(name string) string

func SelectStorages

func SelectStorages(dev *mtp.Device, pat string) ([]uint32, error)

Types

type DeviceFsOptions

type DeviceFsOptions struct {
	// Assume removable volumes are VFAT and munge filenames
	// accordingly.
	RemovableVFat bool

	// Backing directory.
	Dir string

	// Use android extensions if available.
	Android bool
}

Jump to

Keyboard shortcuts

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