Documentation ¶
Index ¶
- Constants
- func Encode(packet AfcPacket, writer io.Writer) error
- type AFCDeviceInfo
- type AfcPacket
- type AfcPacketHeader
- type Connection
- func (conn *Connection) Close()
- func (conn *Connection) GetSpaceInfo() (*AFCDeviceInfo, error)
- func (conn *Connection) ListFiles(cwd string, matchPattern string) ([]string, error)
- func (conn *Connection) MkDir(path string) error
- func (conn *Connection) Pull(srcPath, dstPath string) error
- func (conn *Connection) PullSingleFile(srcPath, dstPath string) error
- func (conn *Connection) Push(srcPath, dstPath string) error
- func (conn *Connection) Remove(path string) error
- func (conn *Connection) Stat(path string) (*statInfo, error)
- func (conn *Connection) TreeView(dpath string, prefix string, treePoint bool) error
Constants ¶
View Source
const ( Afc_magic uint64 = 0x4141504c36414643 Afc_header_size uint64 = 40 Afc_operation_status uint64 = 0x00000001 Afc_operation_data uint64 = 0x00000002 Afc_operation_read_dir uint64 = 0x00000003 Afc_operation_remove_path uint64 = 0x00000008 Afc_operation_make_dir uint64 = 0x00000009 Afc_operation_file_info uint64 = 0x0000000A Afc_operation_device_info uint64 = 0x0000000B Afc_operation_file_open uint64 = 0x0000000D Afc_operation_file_close uint64 = 0x00000014 Afc_operation_file_write uint64 = 0x00000010 Afc_operation_file_open_result uint64 = 0x0000000E Afc_operation_file_read uint64 = 0x0000000F )
View Source
const ( Afc_Mode_RDONLY uint64 = 0x00000001 Afc_Mode_RW uint64 = 0x00000002 Afc_Mode_WRONLY uint64 = 0x00000003 Afc_Mode_WR uint64 = 0x00000004 Afc_Mode_APPEND uint64 = 0x00000005 Afc_Mode_RDAPPEND uint64 = 0x00000006 )
View Source
const ( Afc_Err_Success = 0 Afc_Err_UnknownError = 1 Afc_Err_OperationHeaderInvalid = 2 Afc_Err_NoResources = 3 Afc_Err_ReadError = 4 Afc_Err_WriteError = 5 Afc_Err_UnknownPacketType = 6 Afc_Err_InvalidArgument = 7 Afc_Err_ObjectNotFound = 8 Afc_Err_ObjectIsDir = 9 Afc_Err_PermDenied = 10 Afc_Err_ServiceNotConnected = 11 Afc_Err_OperationTimeout = 12 Afc_Err_TooMuchData = 13 Afc_Err_EndOfData = 14 Afc_Err_OperationNotSupported = 15 Afc_Err_ObjectExists = 16 Afc_Err_ObjectBusy = 17 Afc_Err_NoSpaceLeft = 18 Afc_Err_OperationWouldBlock = 19 Afc_Err_IoError = 20 Afc_Err_OperationInterrupted = 21 Afc_Err_OperationInProgress = 22 Afc_Err_InternalError = 23 Afc_Err_MuxError = 30 Afc_Err_NoMemory = 31 Afc_Err_NotEnoughData = 32 Afc_Err_DirNotEmpty = 33 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AFCDeviceInfo ¶ added in v1.0.84
type AfcPacket ¶ added in v1.0.71
type AfcPacket struct { Header AfcPacketHeader HeaderPayload []byte Payload []byte }
type AfcPacketHeader ¶ added in v1.0.71
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
func New ¶ added in v1.0.71
func New(device ios.DeviceEntry) (*Connection, error)
func NewFromConn ¶
func NewFromConn(deviceConn ios.DeviceConnectionInterface) *Connection
NewFromConn allows to use AFC on a DeviceConnectionInterface, see crashreport for an example
func (*Connection) Close ¶
func (conn *Connection) Close()
func (*Connection) GetSpaceInfo ¶ added in v1.0.84
func (conn *Connection) GetSpaceInfo() (*AFCDeviceInfo, error)
func (*Connection) ListFiles ¶
func (conn *Connection) ListFiles(cwd string, matchPattern string) ([]string, error)
ListFiles returns all files in the given directory, matching the pattern. Example: ListFiles(".", "*") returns all files and dirs in the current path the afc connection is in
func (*Connection) MkDir ¶ added in v1.0.71
func (conn *Connection) MkDir(path string) error
func (*Connection) Pull ¶ added in v1.0.71
func (conn *Connection) Pull(srcPath, dstPath string) error
func (*Connection) PullSingleFile ¶ added in v1.0.71
func (conn *Connection) PullSingleFile(srcPath, dstPath string) error
func (*Connection) Push ¶ added in v1.0.71
func (conn *Connection) Push(srcPath, dstPath string) error
func (*Connection) Remove ¶ added in v1.0.71
func (conn *Connection) Remove(path string) error
func (*Connection) Stat ¶ added in v1.0.71
func (conn *Connection) Stat(path string) (*statInfo, error)
Click to show internal directories.
Click to hide internal directories.