Help us shape the future of Go! Take the 2026 Go Developer Survey

afc

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MODEMASK = 0777
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AfcOp

type AfcOp int

type Client

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

func NewClient

func NewClient(udid string, service ...string) (*Client, error)

func (*Client) Close

func (c *Client) Close() error

func (*Client) CopyFileFromDevice

func (c *Client) CopyFileFromDevice(dst, src string) error

func (*Client) CopyFileToDevice

func (c *Client) CopyFileToDevice(dst, src string) error

CopyFileToDevice copies a source local file to the device

func (*Client) CopyFromDevice

func (c *Client) CopyFromDevice(dst, src string, copyCbFn CopyCallbackFunc) error

func (*Client) CopyToDevice

func (c *Client) CopyToDevice(dst, src string, copyCbFn CopyCallbackFunc) error

func (*Client) FileRefLock

func (c *Client) FileRefLock(ref int) error

func (*Client) FileRefOpen

func (c *Client) FileRefOpen(name string, flags int) (*FileRef, error)

func (*Client) FileRefSetFileSize

func (c *Client) FileRefSetFileSize(ref int, size int64) error

func (*Client) GetConnectionInfo

func (c *Client) GetConnectionInfo() error

func (*Client) GetDeviceInfo

func (c *Client) GetDeviceInfo() (map[string]string, error)

func (*Client) GetDirs

func (c *Client) GetDirs(dir string) ([]string, error)

func (*Client) GetFileInfo

func (c *Client) GetFileInfo(name string) (os.FileInfo, error)

func (*Client) GetFiles

func (c *Client) GetFiles(dir string) ([]string, error)

func (*Client) MakeDir

func (c *Client) MakeDir(dir string) error
func (c *Client) MakeLink(from, to string) error

func (*Client) ReadDir

func (c *Client) ReadDir(dir string) ([]string, error)

func (*Client) RemoveAll

func (c *Client) RemoveAll(path string) error

func (*Client) RemovePath

func (c *Client) RemovePath(path string) error

func (*Client) RenamePath

func (c *Client) RenamePath(from, to string) error

func (*Client) SetConnectionOptions

func (c *Client) SetConnectionOptions() error

func (*Client) SetFSBlockSize

func (c *Client) SetFSBlockSize() error

func (*Client) SetFileTime

func (c *Client) SetFileTime(ref int) error

func (*Client) SetSocketBlockSize

func (c *Client) SetSocketBlockSize() error

func (*Client) TruncateFile

func (c *Client) TruncateFile(name string) error

func (*Client) Walk

func (c *Client) Walk(root string, walkFn filepath.WalkFunc) error

func (*Client) WriteFile

func (c *Client) WriteFile(name string, data []byte) error

func (*Client) WriteFileAtomic

func (c *Client) WriteFileAtomic(name string, data []byte) error

type CopyCallbackFunc

type CopyCallbackFunc func(dst, src string, info os.FileInfo)

type FileRef

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

func (*FileRef) Close

func (f *FileRef) Close() error

func (*FileRef) Read

func (f *FileRef) Read(p []byte) (int, error)

func (*FileRef) Seek

func (f *FileRef) Seek(offset int64, whence int) (int64, error)

func (*FileRef) Write

func (f *FileRef) Write(p []byte) (n int, err error)
type Header struct {
	Magic        [8]byte
	EntireLength uint64
	ThisLength   uint64
	PacketNum    uint64
	Operation    uint64
}

type Printer

type Printer interface {
	Print(Tree) string
}

Printer is printer interface

type Tree

type Tree interface {
	Add(dir, text string) Tree
	AddTree(tree Tree)
	Items() []Tree
	HasItem(text string) bool
	Text() string
	Path() string
	Print() string
	Find(path string) Tree
}

Tree is tree interface

func NewTree

func NewTree(path, text string) Tree

NewTree returns a new GoTree.Tree

Jump to

Keyboard shortcuts

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