Blob: org.bluez.obex.FileTransfer.rst

Blob id: c4b02f43f8b29249f622b3a61a12f5f205621370

Size: 3.4 KB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
===========================
org.bluez.obex.FileTransfer
===========================

-----------------------------------------------
BlueZ D-Bus OBEX FileTransfer API documentation
-----------------------------------------------

:Version: BlueZ
:Date: October 2023
:Manual section: 5
:Manual group: Linux System Administration

Interface
=========

:Service:	org.bluez.obex
:Interface:	org.bluez.obex.FileTransfer1
:Object path:	[Session object path]

Methods
-------

void ChangeFolder(string folder)
````````````````````````````````

Changes the current folder of the remote device.

Possible errors:

:org.bluez.obex.Error.InvalidArguments:
:org.bluez.obex.Error.Failed:

void CreateFolder(string folder)
````````````````````````````````

Creates a new folder in the remote device.

Possible errors:

:org.bluez.obex.Error.InvalidArguments:
:org.bluez.obex.Error.Failed:

array{dict} ListFolder()
````````````````````````

Returns a dictionary containing information about the current folder content.

Possible return values:

:string Name:

	Object name in UTF-8 format.

:string Type:

	Either "folder" or "file".

:uint64 Size:

	Object size or number of items in folder.

:string Permission:

	Group, owner and other permission.

:uint64 Modified:

	Last change.

:uint64 Accessed:

	Last access.

:uint64 Created:

	Creation date.

Possible errors:

:org.bluez.obex.Error.Failed:

object, dict GetFile(string targetfile, string sourcefile)
``````````````````````````````````````````````````````````

Copies the contents of the source file (from remote device) to the target file
(on local filesystem).

If an empty target file is given, a name will be automatically generated for the
temporary file.

The returned path represents the newly created transfer, which should be used to
find out if the content has been successfully transferred or if the operation
fails.

The properties of this transfer are also returned along with the object path, to
avoid a call to GetProperties, see **org.bluez.obex.Transfer(5)** for the
possible list of properties.

Possible errors:

:org.bluez.obex.Error.InvalidArguments:
:org.bluez.obex.Error.Failed:

object, dict PutFile(string sourcefile, string targetfile)
``````````````````````````````````````````````````````````

Copies the contents of the source file (from local filesystem) to the target
file (on remote device).

The returned path represents the newly created transfer, which should be used to
find out if the content has been successfully transferred or if the operation
fails.

The properties of this transfer are also returned along with the object path, to
avoid a call to GetProperties, see **org.bluez.obex.Transfer(5)** for the
possible list of properties.

Possible errors:

:org.bluez.obex.Error.InvalidArguments:
:org.bluez.obex.Error.Failed:

void CopyFile(string sourcefile, string targetfile)
```````````````````````````````````````````````````

Copies the contents from source file to target file on the remote device.

Possible errors:

:org.bluez.obex.Error.InvalidArguments:
:org.bluez.obex.Error.Failed:

void MoveFile(string sourcefile, string targetfile)
```````````````````````````````````````````````````

Moves a file within the remote device from source file to the target file.

Possible errors:

:org.bluez.obex.Error.InvalidArguments:
:org.bluez.obex.Error.Failed:

void Delete(string file)
````````````````````````

Deletes the specified file/folder.

Possible errors:

:org.bluez.obex.Error.InvalidArguments:
:org.bluez.obex.Error.Failed: