src/eric7/Documentation/Source/eric7.MicroPython.MicroPythonFileManager.html

branch
eric7
changeset 10479
856476537696
parent 9853
080e060a0383
child 10515
6e790462348a
equal deleted inserted replaced
10478:de9106c55c3d 10479:856476537696
5 <link rel="stylesheet" href="styles.css"> 5 <link rel="stylesheet" href="styles.css">
6 </head> 6 </head>
7 <body> 7 <body>
8 <a NAME="top" ID="top"></a> 8 <a NAME="top" ID="top"></a>
9 <h1>eric7.MicroPython.MicroPythonFileManager</h1> 9 <h1>eric7.MicroPython.MicroPythonFileManager</h1>
10
11 <p> 10 <p>
12 Module implementing some file system commands for MicroPython. 11 Module implementing some file system commands for MicroPython.
13 </p> 12 </p>
13
14 <h3>Global Attributes</h3> 14 <h3>Global Attributes</h3>
15
16 <table> 15 <table>
17 <tr><td>None</td></tr> 16 <tr><td>None</td></tr>
18 </table> 17 </table>
18
19 <h3>Classes</h3> 19 <h3>Classes</h3>
20 20 <table>
21 <table>
22
23 <tr> 21 <tr>
24 <td><a href="#MicroPythonFileManager">MicroPythonFileManager</a></td> 22 <td><a href="#MicroPythonFileManager">MicroPythonFileManager</a></td>
25 <td>Class implementing an interface to the device file system commands with some additional sugar.</td> 23 <td>Class implementing an interface to the device file system commands with some additional sugar.</td>
26 </tr> 24 </tr>
27 </table> 25 </table>
26
28 <h3>Functions</h3> 27 <h3>Functions</h3>
29
30 <table> 28 <table>
31 <tr><td>None</td></tr> 29 <tr><td>None</td></tr>
32 </table> 30 </table>
31
33 <hr /> 32 <hr />
34 <hr /> 33 <hr />
35 <a NAME="MicroPythonFileManager" ID="MicroPythonFileManager"></a> 34 <a NAME="MicroPythonFileManager" ID="MicroPythonFileManager"></a>
36 <h2>MicroPythonFileManager</h2> 35 <h2>MicroPythonFileManager</h2>
37
38 <p> 36 <p>
39 Class implementing an interface to the device file system commands with 37 Class implementing an interface to the device file system commands with
40 some additional sugar. 38 some additional sugar.
41 </p> 39 </p>
40
42 <h3>Signals</h3> 41 <h3>Signals</h3>
43 <dl> 42 <dl>
44 43
45 <dt>createDirectoryDone()</dt> 44 <dt>createDirectoryDone()</dt>
46 <dd> 45 <dd>
107 </dd> 106 </dd>
108 </dl> 107 </dl>
109 <h3>Derived from</h3> 108 <h3>Derived from</h3>
110 QObject 109 QObject
111 <h3>Class Attributes</h3> 110 <h3>Class Attributes</h3>
112
113 <table> 111 <table>
114 <tr><td>None</td></tr> 112 <tr><td>None</td></tr>
115 </table> 113 </table>
114
116 <h3>Class Methods</h3> 115 <h3>Class Methods</h3>
117
118 <table> 116 <table>
119 <tr><td>None</td></tr> 117 <tr><td>None</td></tr>
120 </table> 118 </table>
119
121 <h3>Methods</h3> 120 <h3>Methods</h3>
122 121 <table>
123 <table>
124
125 <tr> 122 <tr>
126 <td><a href="#MicroPythonFileManager.__init__">MicroPythonFileManager</a></td> 123 <td><a href="#MicroPythonFileManager.__init__">MicroPythonFileManager</a></td>
127 <td>Constructor</td> 124 <td>Constructor</td>
128 </tr> 125 </tr>
129 <tr> 126 <tr>
189 <tr> 186 <tr>
190 <td><a href="#MicroPythonFileManager.writeFile">writeFile</a></td> 187 <td><a href="#MicroPythonFileManager.writeFile">writeFile</a></td>
191 <td>Public method to write some text to a file on the connected device.</td> 188 <td>Public method to write some text to a file on the connected device.</td>
192 </tr> 189 </tr>
193 </table> 190 </table>
191
194 <h3>Static Methods</h3> 192 <h3>Static Methods</h3>
195
196 <table> 193 <table>
197 <tr><td>None</td></tr> 194 <tr><td>None</td></tr>
198 </table> 195 </table>
196
199 197
200 <a NAME="MicroPythonFileManager.__init__" ID="MicroPythonFileManager.__init__"></a> 198 <a NAME="MicroPythonFileManager.__init__" ID="MicroPythonFileManager.__init__"></a>
201 <h4>MicroPythonFileManager (Constructor)</h4> 199 <h4>MicroPythonFileManager (Constructor)</h4>
202 <b>MicroPythonFileManager</b>(<i>device, parent=None</i>) 200 <b>MicroPythonFileManager</b>(<i>device, parent=None</i>)
203
204 <p> 201 <p>
205 Constructor 202 Constructor
206 </p> 203 </p>
204
207 <dl> 205 <dl>
208 206
209 <dt><i>device</i> (BaseDevice)</dt> 207 <dt><i>device</i> (BaseDevice)</dt>
210 <dd> 208 <dd>
211 MicroPython device object 209 MicroPython device object
216 </dd> 214 </dd>
217 </dl> 215 </dl>
218 <a NAME="MicroPythonFileManager.__rsync" ID="MicroPythonFileManager.__rsync"></a> 216 <a NAME="MicroPythonFileManager.__rsync" ID="MicroPythonFileManager.__rsync"></a>
219 <h4>MicroPythonFileManager.__rsync</h4> 217 <h4>MicroPythonFileManager.__rsync</h4>
220 <b>__rsync</b>(<i>hostDirectory, deviceDirectory, mirror=True, localDevice=False, indentLevel=0, </i>) 218 <b>__rsync</b>(<i>hostDirectory, deviceDirectory, mirror=True, localDevice=False, indentLevel=0, </i>)
221
222 <p> 219 <p>
223 Private method to synchronize a local directory to the device. 220 Private method to synchronize a local directory to the device.
224 </p> 221 </p>
222
225 <dl> 223 <dl>
226 224
227 <dt><i>hostDirectory</i> (str)</dt> 225 <dt><i>hostDirectory</i> (str)</dt>
228 <dd> 226 <dd>
229 name of the local directory 227 name of the local directory
259 </dd> 257 </dd>
260 </dl> 258 </dl>
261 <a NAME="MicroPythonFileManager.cd" ID="MicroPythonFileManager.cd"></a> 259 <a NAME="MicroPythonFileManager.cd" ID="MicroPythonFileManager.cd"></a>
262 <h4>MicroPythonFileManager.cd</h4> 260 <h4>MicroPythonFileManager.cd</h4>
263 <b>cd</b>(<i>dirname</i>) 261 <b>cd</b>(<i>dirname</i>)
264
265 <p> 262 <p>
266 Public slot to change the current directory of the device. 263 Public slot to change the current directory of the device.
267 </p> 264 </p>
265
268 <dl> 266 <dl>
269 267
270 <dt><i>dirname</i> (str)</dt> 268 <dt><i>dirname</i> (str)</dt>
271 <dd> 269 <dd>
272 name of the desired current directory 270 name of the desired current directory
273 </dd> 271 </dd>
274 </dl> 272 </dl>
275 <a NAME="MicroPythonFileManager.delete" ID="MicroPythonFileManager.delete"></a> 273 <a NAME="MicroPythonFileManager.delete" ID="MicroPythonFileManager.delete"></a>
276 <h4>MicroPythonFileManager.delete</h4> 274 <h4>MicroPythonFileManager.delete</h4>
277 <b>delete</b>(<i>deviceFileName</i>) 275 <b>delete</b>(<i>deviceFileName</i>)
278
279 <p> 276 <p>
280 Public slot to delete a file on the device. 277 Public slot to delete a file on the device.
281 </p> 278 </p>
279
282 <dl> 280 <dl>
283 281
284 <dt><i>deviceFileName</i> (str)</dt> 282 <dt><i>deviceFileName</i> (str)</dt>
285 <dd> 283 <dd>
286 name of the file on the connected device 284 name of the file on the connected device
287 </dd> 285 </dd>
288 </dl> 286 </dl>
289 <a NAME="MicroPythonFileManager.exists" ID="MicroPythonFileManager.exists"></a> 287 <a NAME="MicroPythonFileManager.exists" ID="MicroPythonFileManager.exists"></a>
290 <h4>MicroPythonFileManager.exists</h4> 288 <h4>MicroPythonFileManager.exists</h4>
291 <b>exists</b>(<i>pathname</i>) 289 <b>exists</b>(<i>pathname</i>)
292
293 <p> 290 <p>
294 Public method to check the existence of a file or directory. 291 Public method to check the existence of a file or directory.
295 </p> 292 </p>
293
296 <dl> 294 <dl>
297 295
298 <dt><i>pathname</i> (str)</dt> 296 <dt><i>pathname</i> (str)</dt>
299 <dd> 297 <dd>
300 name of the path to check 298 name of the path to check
313 </dd> 311 </dd>
314 </dl> 312 </dl>
315 <a NAME="MicroPythonFileManager.fileSystemInfo" ID="MicroPythonFileManager.fileSystemInfo"></a> 313 <a NAME="MicroPythonFileManager.fileSystemInfo" ID="MicroPythonFileManager.fileSystemInfo"></a>
316 <h4>MicroPythonFileManager.fileSystemInfo</h4> 314 <h4>MicroPythonFileManager.fileSystemInfo</h4>
317 <b>fileSystemInfo</b>(<i></i>) 315 <b>fileSystemInfo</b>(<i></i>)
318
319 <p> 316 <p>
320 Public method to obtain information about the currently mounted file 317 Public method to obtain information about the currently mounted file
321 systems. 318 systems.
322 </p> 319 </p>
320
323 <a NAME="MicroPythonFileManager.get" ID="MicroPythonFileManager.get"></a> 321 <a NAME="MicroPythonFileManager.get" ID="MicroPythonFileManager.get"></a>
324 <h4>MicroPythonFileManager.get</h4> 322 <h4>MicroPythonFileManager.get</h4>
325 <b>get</b>(<i>deviceFileName, hostFileName=""</i>) 323 <b>get</b>(<i>deviceFileName, hostFileName=""</i>)
326
327 <p> 324 <p>
328 Public slot to get a file from the connected device. 325 Public slot to get a file from the connected device.
329 </p> 326 </p>
327
330 <dl> 328 <dl>
331 329
332 <dt><i>deviceFileName</i> (str)</dt> 330 <dt><i>deviceFileName</i> (str)</dt>
333 <dd> 331 <dd>
334 name of the file on the device 332 name of the file on the device
339 </dd> 337 </dd>
340 </dl> 338 </dl>
341 <a NAME="MicroPythonFileManager.getData" ID="MicroPythonFileManager.getData"></a> 339 <a NAME="MicroPythonFileManager.getData" ID="MicroPythonFileManager.getData"></a>
342 <h4>MicroPythonFileManager.getData</h4> 340 <h4>MicroPythonFileManager.getData</h4>
343 <b>getData</b>(<i>deviceFileName</i>) 341 <b>getData</b>(<i>deviceFileName</i>)
344
345 <p> 342 <p>
346 Public method to read data from the connected device. 343 Public method to read data from the connected device.
347 </p> 344 </p>
345
348 <dl> 346 <dl>
349 347
350 <dt><i>deviceFileName</i> (str)</dt> 348 <dt><i>deviceFileName</i> (str)</dt>
351 <dd> 349 <dd>
352 name of the file to read from 350 name of the file to read from
365 </dd> 363 </dd>
366 </dl> 364 </dl>
367 <a NAME="MicroPythonFileManager.lls" ID="MicroPythonFileManager.lls"></a> 365 <a NAME="MicroPythonFileManager.lls" ID="MicroPythonFileManager.lls"></a>
368 <h4>MicroPythonFileManager.lls</h4> 366 <h4>MicroPythonFileManager.lls</h4>
369 <b>lls</b>(<i>dirname, showHidden=False</i>) 367 <b>lls</b>(<i>dirname, showHidden=False</i>)
370
371 <p> 368 <p>
372 Public slot to get a long listing of the given directory. 369 Public slot to get a long listing of the given directory.
373 </p> 370 </p>
371
374 <dl> 372 <dl>
375 373
376 <dt><i>dirname</i> (str)</dt> 374 <dt><i>dirname</i> (str)</dt>
377 <dd> 375 <dd>
378 name of the directory to list 376 name of the directory to list
383 </dd> 381 </dd>
384 </dl> 382 </dl>
385 <a NAME="MicroPythonFileManager.makedirs" ID="MicroPythonFileManager.makedirs"></a> 383 <a NAME="MicroPythonFileManager.makedirs" ID="MicroPythonFileManager.makedirs"></a>
386 <h4>MicroPythonFileManager.makedirs</h4> 384 <h4>MicroPythonFileManager.makedirs</h4>
387 <b>makedirs</b>(<i>dirname</i>) 385 <b>makedirs</b>(<i>dirname</i>)
388
389 <p> 386 <p>
390 Public slot to create a new directory and all intermediates. 387 Public slot to create a new directory and all intermediates.
391 </p> 388 </p>
389
392 <dl> 390 <dl>
393 391
394 <dt><i>dirname</i> (str)</dt> 392 <dt><i>dirname</i> (str)</dt>
395 <dd> 393 <dd>
396 name of the directory to create 394 name of the directory to create
397 </dd> 395 </dd>
398 </dl> 396 </dl>
399 <a NAME="MicroPythonFileManager.mkdir" ID="MicroPythonFileManager.mkdir"></a> 397 <a NAME="MicroPythonFileManager.mkdir" ID="MicroPythonFileManager.mkdir"></a>
400 <h4>MicroPythonFileManager.mkdir</h4> 398 <h4>MicroPythonFileManager.mkdir</h4>
401 <b>mkdir</b>(<i>dirname</i>) 399 <b>mkdir</b>(<i>dirname</i>)
402
403 <p> 400 <p>
404 Public slot to create a new directory. 401 Public slot to create a new directory.
405 </p> 402 </p>
403
406 <dl> 404 <dl>
407 405
408 <dt><i>dirname</i> (str)</dt> 406 <dt><i>dirname</i> (str)</dt>
409 <dd> 407 <dd>
410 name of the directory to create 408 name of the directory to create
411 </dd> 409 </dd>
412 </dl> 410 </dl>
413 <a NAME="MicroPythonFileManager.put" ID="MicroPythonFileManager.put"></a> 411 <a NAME="MicroPythonFileManager.put" ID="MicroPythonFileManager.put"></a>
414 <h4>MicroPythonFileManager.put</h4> 412 <h4>MicroPythonFileManager.put</h4>
415 <b>put</b>(<i>hostFileName, deviceFileName=""</i>) 413 <b>put</b>(<i>hostFileName, deviceFileName=""</i>)
416
417 <p> 414 <p>
418 Public slot to put a file onto the device. 415 Public slot to put a file onto the device.
419 </p> 416 </p>
417
420 <dl> 418 <dl>
421 419
422 <dt><i>hostFileName</i> (str)</dt> 420 <dt><i>hostFileName</i> (str)</dt>
423 <dd> 421 <dd>
424 name of the local file 422 name of the local file
429 </dd> 427 </dd>
430 </dl> 428 </dl>
431 <a NAME="MicroPythonFileManager.putData" ID="MicroPythonFileManager.putData"></a> 429 <a NAME="MicroPythonFileManager.putData" ID="MicroPythonFileManager.putData"></a>
432 <h4>MicroPythonFileManager.putData</h4> 430 <h4>MicroPythonFileManager.putData</h4>
433 <b>putData</b>(<i>deviceFileName, data</i>) 431 <b>putData</b>(<i>deviceFileName, data</i>)
434
435 <p> 432 <p>
436 Public method to write data to the connected device. 433 Public method to write data to the connected device.
437 </p> 434 </p>
435
438 <dl> 436 <dl>
439 437
440 <dt><i>deviceFileName</i> (str)</dt> 438 <dt><i>deviceFileName</i> (str)</dt>
441 <dd> 439 <dd>
442 name of the file to write to 440 name of the file to write to
447 </dd> 445 </dd>
448 </dl> 446 </dl>
449 <a NAME="MicroPythonFileManager.pwd" ID="MicroPythonFileManager.pwd"></a> 447 <a NAME="MicroPythonFileManager.pwd" ID="MicroPythonFileManager.pwd"></a>
450 <h4>MicroPythonFileManager.pwd</h4> 448 <h4>MicroPythonFileManager.pwd</h4>
451 <b>pwd</b>(<i></i>) 449 <b>pwd</b>(<i></i>)
452
453 <p> 450 <p>
454 Public slot to get the current directory of the device. 451 Public slot to get the current directory of the device.
455 </p> 452 </p>
453
456 <a NAME="MicroPythonFileManager.rmdir" ID="MicroPythonFileManager.rmdir"></a> 454 <a NAME="MicroPythonFileManager.rmdir" ID="MicroPythonFileManager.rmdir"></a>
457 <h4>MicroPythonFileManager.rmdir</h4> 455 <h4>MicroPythonFileManager.rmdir</h4>
458 <b>rmdir</b>(<i>dirname, recursive=False</i>) 456 <b>rmdir</b>(<i>dirname, recursive=False</i>)
459
460 <p> 457 <p>
461 Public slot to (recursively) remove a directory. 458 Public slot to (recursively) remove a directory.
462 </p> 459 </p>
460
463 <dl> 461 <dl>
464 462
465 <dt><i>dirname</i> (str)</dt> 463 <dt><i>dirname</i> (str)</dt>
466 <dd> 464 <dd>
467 name of the directory to be removed 465 name of the directory to be removed
472 </dd> 470 </dd>
473 </dl> 471 </dl>
474 <a NAME="MicroPythonFileManager.rsync" ID="MicroPythonFileManager.rsync"></a> 472 <a NAME="MicroPythonFileManager.rsync" ID="MicroPythonFileManager.rsync"></a>
475 <h4>MicroPythonFileManager.rsync</h4> 473 <h4>MicroPythonFileManager.rsync</h4>
476 <b>rsync</b>(<i>hostDirectory, deviceDirectory, mirror=True, localDevice=False</i>) 474 <b>rsync</b>(<i>hostDirectory, deviceDirectory, mirror=True, localDevice=False</i>)
477
478 <p> 475 <p>
479 Public slot to synchronize a local directory to the device. 476 Public slot to synchronize a local directory to the device.
480 </p> 477 </p>
478
481 <dl> 479 <dl>
482 480
483 <dt><i>hostDirectory</i> (str)</dt> 481 <dt><i>hostDirectory</i> (str)</dt>
484 <dd> 482 <dd>
485 name of the local directory 483 name of the local directory
499 </dd> 497 </dd>
500 </dl> 498 </dl>
501 <a NAME="MicroPythonFileManager.writeFile" ID="MicroPythonFileManager.writeFile"></a> 499 <a NAME="MicroPythonFileManager.writeFile" ID="MicroPythonFileManager.writeFile"></a>
502 <h4>MicroPythonFileManager.writeFile</h4> 500 <h4>MicroPythonFileManager.writeFile</h4>
503 <b>writeFile</b>(<i>filename, text</i>) 501 <b>writeFile</b>(<i>filename, text</i>)
504
505 <p> 502 <p>
506 Public method to write some text to a file on the connected device. 503 Public method to write some text to a file on the connected device.
507 </p> 504 </p>
505
508 <dl> 506 <dl>
509 507
510 <dt><i>filename</i> (str)</dt> 508 <dt><i>filename</i> (str)</dt>
511 <dd> 509 <dd>
512 name of the file on the connected device 510 name of the file on the connected device

eric ide

mercurial