ntfs

package
v0.15.1 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2021 License: MIT Imports: 9 Imported by: 1

Documentation

Overview

Package ntfs provides an io/fs implementation of the New Technology File System (NTFS).

Currently alternate data streams are not supported.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DirEntry

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

func (*DirEntry) Info

func (d *DirEntry) Info() (fs.FileInfo, error)

func (*DirEntry) IsDir

func (d *DirEntry) IsDir() bool

func (*DirEntry) ModTime

func (d *DirEntry) ModTime() time.Time

func (*DirEntry) Mode

func (d *DirEntry) Mode() fs.FileMode

func (*DirEntry) Name

func (d *DirEntry) Name() string

func (*DirEntry) Size

func (d *DirEntry) Size() int64

func (*DirEntry) Sys

func (d *DirEntry) Sys() interface{}

func (*DirEntry) Type

func (d *DirEntry) Type() fs.FileMode

type FS

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

FS implements a read-only file system for the NTFS.

func New

func New(r io.ReaderAt) (fs *FS, err error)

New creates a new ntfs FS.

func NewWithSize added in v0.15.1

func NewWithSize(r io.ReaderAt, pageSize int64, cacheSize int) (fs *FS, err error)

NewWithSize creates a new ntfs FS with specific pageSize and cacheSize.

func (*FS) Open

func (fsys *FS) Open(name string) (item fs.File, err error)

Open opens a file for reading.

type Item

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

Item describes files and directories in the NTFS.

func (*Item) Close

func (i *Item) Close() error

Close does not do anything for NTFS items.

func (*Item) Read

func (i *Item) Read(p []byte) (n int, err error)

Read reads bytes into the passed buffer.

func (*Item) ReadAt

func (i *Item) ReadAt(p []byte, off int64) (n int, err error)

ReadAt reads bytes starting at off into passed buffer.

func (*Item) ReadDir

func (i *Item) ReadDir(n int) (entries []fs.DirEntry, err error)

ReadDir returns up to n child items of a directory.

func (*Item) Seek

func (i *Item) Seek(pos int64, whence int) (offset int64, err error)

Seek move the current offset to the given position.

func (*Item) Size

func (i *Item) Size() int64

Size returns the item's size.

func (*Item) Stat

func (i *Item) Stat() (fs.FileInfo, error)

Stat returns the MBR pseudo roots itself as fs.FileMode.

Jump to

Keyboard shortcuts

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