src/eric7/Documentation/Source/eric7.RemoteServer.EricServerFileSystemRequestHandler.html

branch
eric7
changeset 10784
521fd465b048
equal deleted inserted replaced
10783:ccf28bec1227 10784:521fd465b048
1 <!DOCTYPE html>
2 <html><head>
3 <title>eric7.RemoteServer.EricServerFileSystemRequestHandler</title>
4 <meta charset="UTF-8">
5 <link rel="stylesheet" href="styles.css">
6 </head>
7 <body>
8 <a NAME="top" ID="top"></a>
9 <h1>eric7.RemoteServer.EricServerFileSystemRequestHandler</h1>
10 <p>
11 Module implementing the file system request handler of the eric-ide server.
12 </p>
13
14 <h3>Global Attributes</h3>
15 <table>
16 <tr><td>None</td></tr>
17 </table>
18
19 <h3>Classes</h3>
20 <table>
21 <tr>
22 <td><a href="#EricServerFileSystemRequestHandler">EricServerFileSystemRequestHandler</a></td>
23 <td>Class implementing the file system request handler of the eric-ide server.</td>
24 </tr>
25 </table>
26
27 <h3>Functions</h3>
28 <table>
29 <tr><td>None</td></tr>
30 </table>
31
32 <hr />
33 <hr />
34 <a NAME="EricServerFileSystemRequestHandler" ID="EricServerFileSystemRequestHandler"></a>
35 <h2>EricServerFileSystemRequestHandler</h2>
36 <p>
37 Class implementing the file system request handler of the eric-ide server.
38 </p>
39
40 <h3>Derived from</h3>
41 EricServerBaseRequestHandler
42 <h3>Class Attributes</h3>
43 <table>
44 <tr><td>None</td></tr>
45 </table>
46
47 <h3>Class Methods</h3>
48 <table>
49 <tr><td>None</td></tr>
50 </table>
51
52 <h3>Methods</h3>
53 <table>
54 <tr>
55 <td><a href="#EricServerFileSystemRequestHandler.__init__">EricServerFileSystemRequestHandler</a></td>
56 <td>Constructor</td>
57 </tr>
58 <tr>
59 <td><a href="#EricServerFileSystemRequestHandler.__access">__access</a></td>
60 <td>Private method to test, if the eric-ide server has the given access rights to a file or directory..</td>
61 </tr>
62 <tr>
63 <td><a href="#EricServerFileSystemRequestHandler.__chdir">__chdir</a></td>
64 <td>Private method to change the current working directory.</td>
65 </tr>
66 <tr>
67 <td><a href="#EricServerFileSystemRequestHandler.__dirEntries">__dirEntries</a></td>
68 <td>Private method to get a list of all files and directories of a given directory.</td>
69 </tr>
70 <tr>
71 <td><a href="#EricServerFileSystemRequestHandler.__exists">__exists</a></td>
72 <td>Private method to check if a file or directory of the given name exists.</td>
73 </tr>
74 <tr>
75 <td><a href="#EricServerFileSystemRequestHandler.__expanduser">__expanduser</a></td>
76 <td>Private method to replace an initial component of ~ or ~user replaced.</td>
77 </tr>
78 <tr>
79 <td><a href="#EricServerFileSystemRequestHandler.__getPathSeparator">__getPathSeparator</a></td>
80 <td>Private method to report the path separator.</td>
81 </tr>
82 <tr>
83 <td><a href="#EricServerFileSystemRequestHandler.__getcwd">__getcwd</a></td>
84 <td>Private method to report the current working directory.</td>
85 </tr>
86 <tr>
87 <td><a href="#EricServerFileSystemRequestHandler.__listdir">__listdir</a></td>
88 <td>Private method to report a directory listing.</td>
89 </tr>
90 <tr>
91 <td><a href="#EricServerFileSystemRequestHandler.__makedirs">__makedirs</a></td>
92 <td>Private method to create a new directory.</td>
93 </tr>
94 <tr>
95 <td><a href="#EricServerFileSystemRequestHandler.__mkdir">__mkdir</a></td>
96 <td>Private method to create a new directory.</td>
97 </tr>
98 <tr>
99 <td><a href="#EricServerFileSystemRequestHandler.__readFile">__readFile</a></td>
100 <td>Private method to read the contents of a file.</td>
101 </tr>
102 <tr>
103 <td><a href="#EricServerFileSystemRequestHandler.__remove">__remove</a></td>
104 <td>Private method to delete a file.</td>
105 </tr>
106 <tr>
107 <td><a href="#EricServerFileSystemRequestHandler.__replace">__replace</a></td>
108 <td>Private method to replace (rename) a file or directory.</td>
109 </tr>
110 <tr>
111 <td><a href="#EricServerFileSystemRequestHandler.__rmdir">__rmdir</a></td>
112 <td>Private method to delete a directory.</td>
113 </tr>
114 <tr>
115 <td><a href="#EricServerFileSystemRequestHandler.__scanDirectory">__scanDirectory</a></td>
116 <td>Private method to scan a given directory.</td>
117 </tr>
118 <tr>
119 <td><a href="#EricServerFileSystemRequestHandler.__shutilCopy">__shutilCopy</a></td>
120 <td>Private method to copy a source file to a destination file or directory.</td>
121 </tr>
122 <tr>
123 <td><a href="#EricServerFileSystemRequestHandler.__shutilRmtree">__shutilRmtree</a></td>
124 <td>Private method to delete an entire directory tree.</td>
125 </tr>
126 <tr>
127 <td><a href="#EricServerFileSystemRequestHandler.__stat">__stat</a></td>
128 <td>Private method to get the status of a file.</td>
129 </tr>
130 <tr>
131 <td><a href="#EricServerFileSystemRequestHandler.__writeFile">__writeFile</a></td>
132 <td>Private method to write data into a file.</td>
133 </tr>
134 <tr>
135 <td><a href="#EricServerFileSystemRequestHandler.sendError">sendError</a></td>
136 <td>Public method to send an error report to the IDE.</td>
137 </tr>
138 </table>
139
140 <h3>Static Methods</h3>
141 <table>
142 <tr><td>None</td></tr>
143 </table>
144
145
146 <a NAME="EricServerFileSystemRequestHandler.__init__" ID="EricServerFileSystemRequestHandler.__init__"></a>
147 <h4>EricServerFileSystemRequestHandler (Constructor)</h4>
148 <b>EricServerFileSystemRequestHandler</b>(<i>server</i>)
149 <p>
150 Constructor
151 </p>
152
153 <dl>
154
155 <dt><i>server</i> (EricServer)</dt>
156 <dd>
157 reference to the eric-ide server object
158 </dd>
159 </dl>
160 <a NAME="EricServerFileSystemRequestHandler.__access" ID="EricServerFileSystemRequestHandler.__access"></a>
161 <h4>EricServerFileSystemRequestHandler.__access</h4>
162 <b>__access</b>(<i>params</i>)
163 <p>
164 Private method to test, if the eric-ide server has the given access rights
165 to a file or directory..
166 </p>
167
168 <dl>
169
170 <dt><i>params</i> (dict)</dt>
171 <dd>
172 dictionary containing the request data
173 </dd>
174 </dl>
175 <dl>
176 <dt>Return:</dt>
177 <dd>
178 dictionary containing the reply data
179 </dd>
180 </dl>
181 <dl>
182 <dt>Return Type:</dt>
183 <dd>
184 dict
185 </dd>
186 </dl>
187 <a NAME="EricServerFileSystemRequestHandler.__chdir" ID="EricServerFileSystemRequestHandler.__chdir"></a>
188 <h4>EricServerFileSystemRequestHandler.__chdir</h4>
189 <b>__chdir</b>(<i>params</i>)
190 <p>
191 Private method to change the current working directory.
192 </p>
193
194 <dl>
195
196 <dt><i>params</i> (dict)</dt>
197 <dd>
198 dictionary containing the request data
199 </dd>
200 </dl>
201 <dl>
202 <dt>Return:</dt>
203 <dd>
204 dictionary containing the reply data
205 </dd>
206 </dl>
207 <dl>
208 <dt>Return Type:</dt>
209 <dd>
210 dict
211 </dd>
212 </dl>
213 <a NAME="EricServerFileSystemRequestHandler.__dirEntries" ID="EricServerFileSystemRequestHandler.__dirEntries"></a>
214 <h4>EricServerFileSystemRequestHandler.__dirEntries</h4>
215 <b>__dirEntries</b>(<i>params</i>)
216 <p>
217 Private method to get a list of all files and directories of a given directory.
218 </p>
219
220 <dl>
221
222 <dt><i>params</i> (dict)</dt>
223 <dd>
224 dictionary containing the request data
225 </dd>
226 </dl>
227 <dl>
228 <dt>Return:</dt>
229 <dd>
230 dictionary containing the reply data
231 </dd>
232 </dl>
233 <dl>
234 <dt>Return Type:</dt>
235 <dd>
236 dict
237 </dd>
238 </dl>
239 <a NAME="EricServerFileSystemRequestHandler.__exists" ID="EricServerFileSystemRequestHandler.__exists"></a>
240 <h4>EricServerFileSystemRequestHandler.__exists</h4>
241 <b>__exists</b>(<i>params</i>)
242 <p>
243 Private method to check if a file or directory of the given name exists.
244 </p>
245
246 <dl>
247
248 <dt><i>params</i> (dict)</dt>
249 <dd>
250 dictionary containing the request data
251 </dd>
252 </dl>
253 <dl>
254 <dt>Return:</dt>
255 <dd>
256 dictionary containing the reply data
257 </dd>
258 </dl>
259 <dl>
260 <dt>Return Type:</dt>
261 <dd>
262 dict
263 </dd>
264 </dl>
265 <a NAME="EricServerFileSystemRequestHandler.__expanduser" ID="EricServerFileSystemRequestHandler.__expanduser"></a>
266 <h4>EricServerFileSystemRequestHandler.__expanduser</h4>
267 <b>__expanduser</b>(<i>params</i>)
268 <p>
269 Private method to replace an initial component of ~ or ~user replaced.
270 </p>
271
272 <dl>
273
274 <dt><i>params</i> (dict)</dt>
275 <dd>
276 dictionary containing the request data
277 </dd>
278 </dl>
279 <dl>
280 <dt>Return:</dt>
281 <dd>
282 dictionary containing the reply data
283 </dd>
284 </dl>
285 <dl>
286 <dt>Return Type:</dt>
287 <dd>
288 dict
289 </dd>
290 </dl>
291 <a NAME="EricServerFileSystemRequestHandler.__getPathSeparator" ID="EricServerFileSystemRequestHandler.__getPathSeparator"></a>
292 <h4>EricServerFileSystemRequestHandler.__getPathSeparator</h4>
293 <b>__getPathSeparator</b>(<i>params</i>)
294 <p>
295 Private method to report the path separator.
296 </p>
297
298 <dl>
299
300 <dt><i>params</i> (dict)</dt>
301 <dd>
302 dictionary containing the request data
303 </dd>
304 </dl>
305 <dl>
306 <dt>Return:</dt>
307 <dd>
308 dictionary containing the reply data
309 </dd>
310 </dl>
311 <dl>
312 <dt>Return Type:</dt>
313 <dd>
314 dict
315 </dd>
316 </dl>
317 <a NAME="EricServerFileSystemRequestHandler.__getcwd" ID="EricServerFileSystemRequestHandler.__getcwd"></a>
318 <h4>EricServerFileSystemRequestHandler.__getcwd</h4>
319 <b>__getcwd</b>(<i>params</i>)
320 <p>
321 Private method to report the current working directory.
322 </p>
323
324 <dl>
325
326 <dt><i>params</i> (dict)</dt>
327 <dd>
328 dictionary containing the request data
329 </dd>
330 </dl>
331 <dl>
332 <dt>Return:</dt>
333 <dd>
334 dictionary containing the reply data
335 </dd>
336 </dl>
337 <dl>
338 <dt>Return Type:</dt>
339 <dd>
340 dict
341 </dd>
342 </dl>
343 <a NAME="EricServerFileSystemRequestHandler.__listdir" ID="EricServerFileSystemRequestHandler.__listdir"></a>
344 <h4>EricServerFileSystemRequestHandler.__listdir</h4>
345 <b>__listdir</b>(<i>params</i>)
346 <p>
347 Private method to report a directory listing.
348 </p>
349
350 <dl>
351
352 <dt><i>params</i> (dict)</dt>
353 <dd>
354 dictionary containing the request data
355 </dd>
356 </dl>
357 <dl>
358 <dt>Return:</dt>
359 <dd>
360 dictionary containing the reply data
361 </dd>
362 </dl>
363 <dl>
364 <dt>Return Type:</dt>
365 <dd>
366 dict
367 </dd>
368 </dl>
369 <a NAME="EricServerFileSystemRequestHandler.__makedirs" ID="EricServerFileSystemRequestHandler.__makedirs"></a>
370 <h4>EricServerFileSystemRequestHandler.__makedirs</h4>
371 <b>__makedirs</b>(<i>params</i>)
372 <p>
373 Private method to create a new directory.
374 </p>
375
376 <dl>
377
378 <dt><i>params</i> (dict)</dt>
379 <dd>
380 dictionary containing the request data
381 </dd>
382 </dl>
383 <dl>
384 <dt>Return:</dt>
385 <dd>
386 dictionary containing the reply data
387 </dd>
388 </dl>
389 <dl>
390 <dt>Return Type:</dt>
391 <dd>
392 dict
393 </dd>
394 </dl>
395 <a NAME="EricServerFileSystemRequestHandler.__mkdir" ID="EricServerFileSystemRequestHandler.__mkdir"></a>
396 <h4>EricServerFileSystemRequestHandler.__mkdir</h4>
397 <b>__mkdir</b>(<i>params</i>)
398 <p>
399 Private method to create a new directory.
400 </p>
401
402 <dl>
403
404 <dt><i>params</i> (dict)</dt>
405 <dd>
406 dictionary containing the request data
407 </dd>
408 </dl>
409 <dl>
410 <dt>Return:</dt>
411 <dd>
412 dictionary containing the reply data
413 </dd>
414 </dl>
415 <dl>
416 <dt>Return Type:</dt>
417 <dd>
418 dict
419 </dd>
420 </dl>
421 <a NAME="EricServerFileSystemRequestHandler.__readFile" ID="EricServerFileSystemRequestHandler.__readFile"></a>
422 <h4>EricServerFileSystemRequestHandler.__readFile</h4>
423 <b>__readFile</b>(<i>params</i>)
424 <p>
425 Private method to read the contents of a file.
426 </p>
427
428 <dl>
429
430 <dt><i>params</i> (dict)</dt>
431 <dd>
432 dictionary containing the request data
433 </dd>
434 </dl>
435 <dl>
436 <dt>Return:</dt>
437 <dd>
438 dictionary containing the reply data
439 </dd>
440 </dl>
441 <dl>
442 <dt>Return Type:</dt>
443 <dd>
444 dict
445 </dd>
446 </dl>
447 <a NAME="EricServerFileSystemRequestHandler.__remove" ID="EricServerFileSystemRequestHandler.__remove"></a>
448 <h4>EricServerFileSystemRequestHandler.__remove</h4>
449 <b>__remove</b>(<i>params</i>)
450 <p>
451 Private method to delete a file.
452 </p>
453
454 <dl>
455
456 <dt><i>params</i> (dict)</dt>
457 <dd>
458 dictionary containing the request data
459 </dd>
460 </dl>
461 <dl>
462 <dt>Return:</dt>
463 <dd>
464 dictionary containing the reply data
465 </dd>
466 </dl>
467 <dl>
468 <dt>Return Type:</dt>
469 <dd>
470 dict
471 </dd>
472 </dl>
473 <a NAME="EricServerFileSystemRequestHandler.__replace" ID="EricServerFileSystemRequestHandler.__replace"></a>
474 <h4>EricServerFileSystemRequestHandler.__replace</h4>
475 <b>__replace</b>(<i>params</i>)
476 <p>
477 Private method to replace (rename) a file or directory.
478 </p>
479 <p>
480
481 </p>
482
483 <dl>
484
485 <dt><i>params</i> (dict)</dt>
486 <dd>
487 dictionary containing the request data
488 </dd>
489 </dl>
490 <dl>
491 <dt>Return:</dt>
492 <dd>
493 dictionary containing the reply data
494 </dd>
495 </dl>
496 <dl>
497 <dt>Return Type:</dt>
498 <dd>
499 dict
500 </dd>
501 </dl>
502 <a NAME="EricServerFileSystemRequestHandler.__rmdir" ID="EricServerFileSystemRequestHandler.__rmdir"></a>
503 <h4>EricServerFileSystemRequestHandler.__rmdir</h4>
504 <b>__rmdir</b>(<i>params</i>)
505 <p>
506 Private method to delete a directory.
507 </p>
508
509 <dl>
510
511 <dt><i>params</i> (dict)</dt>
512 <dd>
513 dictionary containing the request data
514 </dd>
515 </dl>
516 <dl>
517 <dt>Return:</dt>
518 <dd>
519 dictionary containing the reply data
520 </dd>
521 </dl>
522 <dl>
523 <dt>Return Type:</dt>
524 <dd>
525 dict
526 </dd>
527 </dl>
528 <a NAME="EricServerFileSystemRequestHandler.__scanDirectory" ID="EricServerFileSystemRequestHandler.__scanDirectory"></a>
529 <h4>EricServerFileSystemRequestHandler.__scanDirectory</h4>
530 <b>__scanDirectory</b>(<i>directory, recursive, withHidden=False</i>)
531 <p>
532 Private method to scan a given directory.
533 </p>
534
535 <dl>
536
537 <dt><i>directory</i> (str)</dt>
538 <dd>
539 path of the directory to be scanned
540 </dd>
541 <dt><i>recursive</i> (bool)</dt>
542 <dd>
543 flag indicating a recursive scan
544 </dd>
545 <dt><i>withHidden</i> (bool (optional))</dt>
546 <dd>
547 flag indicating to list hidden files and directories
548 as well (defaults to False)
549 </dd>
550 </dl>
551 <dl>
552 <dt>Return:</dt>
553 <dd>
554 list of file and directory entries
555 </dd>
556 </dl>
557 <dl>
558 <dt>Return Type:</dt>
559 <dd>
560 list of dict
561 </dd>
562 </dl>
563 <a NAME="EricServerFileSystemRequestHandler.__shutilCopy" ID="EricServerFileSystemRequestHandler.__shutilCopy"></a>
564 <h4>EricServerFileSystemRequestHandler.__shutilCopy</h4>
565 <b>__shutilCopy</b>(<i>params</i>)
566 <p>
567 Private method to copy a source file to a destination file or directory.
568 </p>
569
570 <dl>
571
572 <dt><i>params</i> (dict)</dt>
573 <dd>
574 dictionary containing the request data
575 </dd>
576 </dl>
577 <dl>
578 <dt>Return:</dt>
579 <dd>
580 dictionary containing the reply data
581 </dd>
582 </dl>
583 <dl>
584 <dt>Return Type:</dt>
585 <dd>
586 dict
587 </dd>
588 </dl>
589 <a NAME="EricServerFileSystemRequestHandler.__shutilRmtree" ID="EricServerFileSystemRequestHandler.__shutilRmtree"></a>
590 <h4>EricServerFileSystemRequestHandler.__shutilRmtree</h4>
591 <b>__shutilRmtree</b>(<i>params</i>)
592 <p>
593 Private method to delete an entire directory tree.
594 </p>
595
596 <dl>
597
598 <dt><i>params</i> (dict)</dt>
599 <dd>
600 dictionary containing the request data
601 </dd>
602 </dl>
603 <dl>
604 <dt>Return:</dt>
605 <dd>
606 dictionary containing the reply data
607 </dd>
608 </dl>
609 <dl>
610 <dt>Return Type:</dt>
611 <dd>
612 dict
613 </dd>
614 </dl>
615 <a NAME="EricServerFileSystemRequestHandler.__stat" ID="EricServerFileSystemRequestHandler.__stat"></a>
616 <h4>EricServerFileSystemRequestHandler.__stat</h4>
617 <b>__stat</b>(<i>params</i>)
618 <p>
619 Private method to get the status of a file.
620 </p>
621
622 <dl>
623
624 <dt><i>params</i> (dict)</dt>
625 <dd>
626 dictionary containing the request data
627 </dd>
628 </dl>
629 <dl>
630 <dt>Return:</dt>
631 <dd>
632 dictionary containing the reply data
633 </dd>
634 </dl>
635 <dl>
636 <dt>Return Type:</dt>
637 <dd>
638 dict
639 </dd>
640 </dl>
641 <a NAME="EricServerFileSystemRequestHandler.__writeFile" ID="EricServerFileSystemRequestHandler.__writeFile"></a>
642 <h4>EricServerFileSystemRequestHandler.__writeFile</h4>
643 <b>__writeFile</b>(<i>params</i>)
644 <p>
645 Private method to write data into a file.
646 </p>
647
648 <dl>
649
650 <dt><i>params</i> (dict)</dt>
651 <dd>
652 dictionary containing the request data
653 </dd>
654 </dl>
655 <dl>
656 <dt>Return:</dt>
657 <dd>
658 dictionary containing the reply data
659 </dd>
660 </dl>
661 <dl>
662 <dt>Return Type:</dt>
663 <dd>
664 dict
665 </dd>
666 </dl>
667 <a NAME="EricServerFileSystemRequestHandler.sendError" ID="EricServerFileSystemRequestHandler.sendError"></a>
668 <h4>EricServerFileSystemRequestHandler.sendError</h4>
669 <b>sendError</b>(<i>request, reqestUuid=""</i>)
670 <p>
671 Public method to send an error report to the IDE.
672 </p>
673
674 <dl>
675
676 <dt><i>request</i> (str)</dt>
677 <dd>
678 request name
679 </dd>
680 <dt><i>reqestUuid</i> (str)</dt>
681 <dd>
682 UUID of the associated request as sent by the eric IDE
683 (defaults to "", i.e. no UUID received)
684 </dd>
685 </dl>
686 <div align="right"><a href="#top">Up</a></div>
687 <hr />
688 </body></html>

eric ide

mercurial