|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric7.RemoteServerInterface.EricServerFileSystemInterface</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.RemoteServerInterface.EricServerFileSystemInterface</h1> |
|
10 <p> |
|
11 Module implementing the file system interface to the eric-ide server. |
|
12 </p> |
|
13 |
|
14 <h3>Global Attributes</h3> |
|
15 <table> |
|
16 <tr><td>_RemoteFsCache</td></tr> |
|
17 </table> |
|
18 |
|
19 <h3>Classes</h3> |
|
20 <table> |
|
21 <tr> |
|
22 <td><a href="#EricServerFileSystemInterface">EricServerFileSystemInterface</a></td> |
|
23 <td>Class implementing the file system interface to the eric-ide server.</td> |
|
24 </tr> |
|
25 <tr> |
|
26 <td><a href="#EricServerNotConnectedError">EricServerNotConnectedError</a></td> |
|
27 <td>Class defining a special OSError indicating a missing server connection.</td> |
|
28 </tr> |
|
29 </table> |
|
30 |
|
31 <h3>Functions</h3> |
|
32 <table> |
|
33 <tr><td>None</td></tr> |
|
34 </table> |
|
35 |
|
36 <hr /> |
|
37 <hr /> |
|
38 <a NAME="EricServerFileSystemInterface" ID="EricServerFileSystemInterface"></a> |
|
39 <h2>EricServerFileSystemInterface</h2> |
|
40 <p> |
|
41 Class implementing the file system interface to the eric-ide server. |
|
42 </p> |
|
43 |
|
44 <h3>Derived from</h3> |
|
45 QObject |
|
46 <h3>Class Attributes</h3> |
|
47 <table> |
|
48 <tr><td>NotConnectedMessage</td></tr> |
|
49 <tr><td>_MagicCheck</td></tr> |
|
50 </table> |
|
51 |
|
52 <h3>Class Methods</h3> |
|
53 <table> |
|
54 <tr><td>None</td></tr> |
|
55 </table> |
|
56 |
|
57 <h3>Methods</h3> |
|
58 <table> |
|
59 <tr> |
|
60 <td><a href="#EricServerFileSystemInterface.__init__">EricServerFileSystemInterface</a></td> |
|
61 <td>Constructor</td> |
|
62 </tr> |
|
63 <tr> |
|
64 <td><a href="#EricServerFileSystemInterface.__connectionStateChanged">__connectionStateChanged</a></td> |
|
65 <td>Private slot handling a change of the server connection state.</td> |
|
66 </tr> |
|
67 <tr> |
|
68 <td><a href="#EricServerFileSystemInterface.__getPathSep">__getPathSep</a></td> |
|
69 <td>Private method to get the path separator of the connected server.</td> |
|
70 </tr> |
|
71 <tr> |
|
72 <td><a href="#EricServerFileSystemInterface.__hasMagic">__hasMagic</a></td> |
|
73 <td>Private method to check, if a given path contains glob style magic characters.</td> |
|
74 </tr> |
|
75 <tr> |
|
76 <td><a href="#EricServerFileSystemInterface.abspath">abspath</a></td> |
|
77 <td>Public method to convert the given path to an absolute path.</td> |
|
78 </tr> |
|
79 <tr> |
|
80 <td><a href="#EricServerFileSystemInterface.access">access</a></td> |
|
81 <td>Public method to test the given access rights to a file or directory.</td> |
|
82 </tr> |
|
83 <tr> |
|
84 <td><a href="#EricServerFileSystemInterface.basename">basename</a></td> |
|
85 <td>Public method to extract the final component of a path name.</td> |
|
86 </tr> |
|
87 <tr> |
|
88 <td><a href="#EricServerFileSystemInterface.callback">callback</a></td> |
|
89 <td>Function to handle the server reply</td> |
|
90 </tr> |
|
91 <tr> |
|
92 <td><a href="#EricServerFileSystemInterface.chdir">chdir</a></td> |
|
93 <td>Public method to change the current working directory of the eric-ide server.</td> |
|
94 </tr> |
|
95 <tr> |
|
96 <td><a href="#EricServerFileSystemInterface.compactPath">compactPath</a></td> |
|
97 <td>Public method to return a compacted path fitting inside the given width.</td> |
|
98 </tr> |
|
99 <tr> |
|
100 <td><a href="#EricServerFileSystemInterface.direntries">direntries</a></td> |
|
101 <td>Public method to get a list of all files and directories of a given directory.</td> |
|
102 </tr> |
|
103 <tr> |
|
104 <td><a href="#EricServerFileSystemInterface.dirname">dirname</a></td> |
|
105 <td>Public method to extract the directory component of a path name.</td> |
|
106 </tr> |
|
107 <tr> |
|
108 <td><a href="#EricServerFileSystemInterface.exists">exists</a></td> |
|
109 <td>Public method the existence of a file or directory.</td> |
|
110 </tr> |
|
111 <tr> |
|
112 <td><a href="#EricServerFileSystemInterface.expanduser">expanduser</a></td> |
|
113 <td>Public method to expand an initial '~' or '~user' component.</td> |
|
114 </tr> |
|
115 <tr> |
|
116 <td><a href="#EricServerFileSystemInterface.fromNativeSeparators">fromNativeSeparators</a></td> |
|
117 <td>Public method to convert a path using server native separator characters to use "/" separator characters.</td> |
|
118 </tr> |
|
119 <tr> |
|
120 <td><a href="#EricServerFileSystemInterface.getcwd">getcwd</a></td> |
|
121 <td>Public method to get the current working directory of the eric-ide server.</td> |
|
122 </tr> |
|
123 <tr> |
|
124 <td><a href="#EricServerFileSystemInterface.glob">glob</a></td> |
|
125 <td>Public method to get a list of of all files matching a given pattern like 'glob.glob()'.</td> |
|
126 </tr> |
|
127 <tr> |
|
128 <td><a href="#EricServerFileSystemInterface.isabs">isabs</a></td> |
|
129 <td>Public method to chack a path for being an absolute path.</td> |
|
130 </tr> |
|
131 <tr> |
|
132 <td><a href="#EricServerFileSystemInterface.isdir">isdir</a></td> |
|
133 <td>Public method to check, if the given name is a directory.</td> |
|
134 </tr> |
|
135 <tr> |
|
136 <td><a href="#EricServerFileSystemInterface.isfile">isfile</a></td> |
|
137 <td>Public method to check, if the given name is a regular file.</td> |
|
138 </tr> |
|
139 <tr> |
|
140 <td><a href="#EricServerFileSystemInterface.join">join</a></td> |
|
141 <td>Public method to join two or more path name components using the path separator of the server side.</td> |
|
142 </tr> |
|
143 <tr> |
|
144 <td><a href="#EricServerFileSystemInterface.listdir">listdir</a></td> |
|
145 <td>Public method to get a directory listing.</td> |
|
146 </tr> |
|
147 <tr> |
|
148 <td><a href="#EricServerFileSystemInterface.makedirs">makedirs</a></td> |
|
149 <td>Public method to create a new directory on the eric-ide serverincluding all intermediate-level directories.</td> |
|
150 </tr> |
|
151 <tr> |
|
152 <td><a href="#EricServerFileSystemInterface.mkdir">mkdir</a></td> |
|
153 <td>Public method to create a new directory on the eric-ide server.</td> |
|
154 </tr> |
|
155 <tr> |
|
156 <td><a href="#EricServerFileSystemInterface.populateFsCache">populateFsCache</a></td> |
|
157 <td>Public method to populate the remote file system cache for a given directory.</td> |
|
158 </tr> |
|
159 <tr> |
|
160 <td><a href="#EricServerFileSystemInterface.readEncodedFile">readEncodedFile</a></td> |
|
161 <td>Public method to read a file and decode its contents into proper text.</td> |
|
162 </tr> |
|
163 <tr> |
|
164 <td><a href="#EricServerFileSystemInterface.readEncodedFileWithEncoding">readEncodedFileWithEncoding</a></td> |
|
165 <td>Public method to read a file and decode its contents into proper text.</td> |
|
166 </tr> |
|
167 <tr> |
|
168 <td><a href="#EricServerFileSystemInterface.readFile">readFile</a></td> |
|
169 <td>Public method to read a file from the eric-ide server.</td> |
|
170 </tr> |
|
171 <tr> |
|
172 <td><a href="#EricServerFileSystemInterface.remove">remove</a></td> |
|
173 <td>Public method to delete a file on the eric-ide server.</td> |
|
174 </tr> |
|
175 <tr> |
|
176 <td><a href="#EricServerFileSystemInterface.removeFromFsCache">removeFromFsCache</a></td> |
|
177 <td>Public method to remove a given directory from the remote file system cache.</td> |
|
178 </tr> |
|
179 <tr> |
|
180 <td><a href="#EricServerFileSystemInterface.replace">replace</a></td> |
|
181 <td>Public method to rename a file or directory.</td> |
|
182 </tr> |
|
183 <tr> |
|
184 <td><a href="#EricServerFileSystemInterface.rmdir">rmdir</a></td> |
|
185 <td>Public method to delete a directory on the eric-ide server.</td> |
|
186 </tr> |
|
187 <tr> |
|
188 <td><a href="#EricServerFileSystemInterface.separator">separator</a></td> |
|
189 <td>Public method to return the server side path separator string.</td> |
|
190 </tr> |
|
191 <tr> |
|
192 <td><a href="#EricServerFileSystemInterface.shutilCopy">shutilCopy</a></td> |
|
193 <td>Public method to copy a source file to a given destination file or directory.</td> |
|
194 </tr> |
|
195 <tr> |
|
196 <td><a href="#EricServerFileSystemInterface.shutilRmtree">shutilRmtree</a></td> |
|
197 <td>Public method to delete an entire directory tree.</td> |
|
198 </tr> |
|
199 <tr> |
|
200 <td><a href="#EricServerFileSystemInterface.split">split</a></td> |
|
201 <td>Public method to split a path name.</td> |
|
202 </tr> |
|
203 <tr> |
|
204 <td><a href="#EricServerFileSystemInterface.splitdrive">splitdrive</a></td> |
|
205 <td>Public method to split a path into drive and path.</td> |
|
206 </tr> |
|
207 <tr> |
|
208 <td><a href="#EricServerFileSystemInterface.splitext">splitext</a></td> |
|
209 <td>Public method to split a path name into a root part and an extension.</td> |
|
210 </tr> |
|
211 <tr> |
|
212 <td><a href="#EricServerFileSystemInterface.stat">stat</a></td> |
|
213 <td>Public method to get the status of a file.</td> |
|
214 </tr> |
|
215 <tr> |
|
216 <td><a href="#EricServerFileSystemInterface.toNativeSeparators">toNativeSeparators</a></td> |
|
217 <td>Public method to convert a path to use server native separator characters.</td> |
|
218 </tr> |
|
219 <tr> |
|
220 <td><a href="#EricServerFileSystemInterface.writeEncodedFile">writeEncodedFile</a></td> |
|
221 <td>Public method to write a file with properly encoded text.</td> |
|
222 </tr> |
|
223 <tr> |
|
224 <td><a href="#EricServerFileSystemInterface.writeFile">writeFile</a></td> |
|
225 <td>Public method to write the data to a file on the eric-ide server.</td> |
|
226 </tr> |
|
227 </table> |
|
228 |
|
229 <h3>Static Methods</h3> |
|
230 <table> |
|
231 <tr><td>None</td></tr> |
|
232 </table> |
|
233 |
|
234 |
|
235 <a NAME="EricServerFileSystemInterface.__init__" ID="EricServerFileSystemInterface.__init__"></a> |
|
236 <h4>EricServerFileSystemInterface (Constructor)</h4> |
|
237 <b>EricServerFileSystemInterface</b>(<i>serverInterface</i>) |
|
238 <p> |
|
239 Constructor |
|
240 </p> |
|
241 |
|
242 <dl> |
|
243 |
|
244 <dt><i>serverInterface</i> (EricServerInterface)</dt> |
|
245 <dd> |
|
246 reference to the eric-ide server interface |
|
247 </dd> |
|
248 </dl> |
|
249 <a NAME="EricServerFileSystemInterface.__connectionStateChanged" ID="EricServerFileSystemInterface.__connectionStateChanged"></a> |
|
250 <h4>EricServerFileSystemInterface.__connectionStateChanged</h4> |
|
251 <b>__connectionStateChanged</b>(<i>connected</i>) |
|
252 <p> |
|
253 Private slot handling a change of the server connection state. |
|
254 </p> |
|
255 |
|
256 <dl> |
|
257 |
|
258 <dt><i>connected</i> (bool)</dt> |
|
259 <dd> |
|
260 flag indicating a connected state |
|
261 </dd> |
|
262 </dl> |
|
263 <a NAME="EricServerFileSystemInterface.__getPathSep" ID="EricServerFileSystemInterface.__getPathSep"></a> |
|
264 <h4>EricServerFileSystemInterface.__getPathSep</h4> |
|
265 <b>__getPathSep</b>(<i></i>) |
|
266 <p> |
|
267 Private method to get the path separator of the connected server. |
|
268 </p> |
|
269 |
|
270 <dl> |
|
271 <dt>Return:</dt> |
|
272 <dd> |
|
273 path separator character of the server |
|
274 </dd> |
|
275 </dl> |
|
276 <dl> |
|
277 <dt>Return Type:</dt> |
|
278 <dd> |
|
279 str |
|
280 </dd> |
|
281 </dl> |
|
282 <a NAME="EricServerFileSystemInterface.__hasMagic" ID="EricServerFileSystemInterface.__hasMagic"></a> |
|
283 <h4>EricServerFileSystemInterface.__hasMagic</h4> |
|
284 <b>__hasMagic</b>(<i>pathname</i>) |
|
285 <p> |
|
286 Private method to check, if a given path contains glob style magic characters. |
|
287 </p> |
|
288 <p> |
|
289 Note: This was taken from 'glob.glob'. |
|
290 </p> |
|
291 |
|
292 <dl> |
|
293 |
|
294 <dt><i>pathname</i> (str)</dt> |
|
295 <dd> |
|
296 path name to be checked |
|
297 </dd> |
|
298 </dl> |
|
299 <dl> |
|
300 <dt>Return:</dt> |
|
301 <dd> |
|
302 flag indicating the presence of magic characters |
|
303 </dd> |
|
304 </dl> |
|
305 <dl> |
|
306 <dt>Return Type:</dt> |
|
307 <dd> |
|
308 bool |
|
309 </dd> |
|
310 </dl> |
|
311 <a NAME="EricServerFileSystemInterface.abspath" ID="EricServerFileSystemInterface.abspath"></a> |
|
312 <h4>EricServerFileSystemInterface.abspath</h4> |
|
313 <b>abspath</b>(<i>p</i>) |
|
314 <p> |
|
315 Public method to convert the given path to an absolute path. |
|
316 </p> |
|
317 |
|
318 <dl> |
|
319 |
|
320 <dt><i>p</i> (str)</dt> |
|
321 <dd> |
|
322 path to be converted |
|
323 </dd> |
|
324 </dl> |
|
325 <dl> |
|
326 <dt>Return:</dt> |
|
327 <dd> |
|
328 absolute path |
|
329 </dd> |
|
330 </dl> |
|
331 <dl> |
|
332 <dt>Return Type:</dt> |
|
333 <dd> |
|
334 str |
|
335 </dd> |
|
336 </dl> |
|
337 <a NAME="EricServerFileSystemInterface.access" ID="EricServerFileSystemInterface.access"></a> |
|
338 <h4>EricServerFileSystemInterface.access</h4> |
|
339 <b>access</b>(<i>name, modes</i>) |
|
340 <p> |
|
341 Public method to test the given access rights to a file or directory. |
|
342 </p> |
|
343 <p> |
|
344 The modes to check for are 'read', 'write' or 'execute' or any combination. |
|
345 </p> |
|
346 |
|
347 <dl> |
|
348 |
|
349 <dt><i>name</i> (str)</dt> |
|
350 <dd> |
|
351 name of the file or directory |
|
352 </dd> |
|
353 <dt><i>modes</i> (str or list of str)</dt> |
|
354 <dd> |
|
355 list of modes to check for |
|
356 </dd> |
|
357 </dl> |
|
358 <dl> |
|
359 <dt>Return:</dt> |
|
360 <dd> |
|
361 flag indicating the user has the asked for permissions |
|
362 </dd> |
|
363 </dl> |
|
364 <dl> |
|
365 <dt>Return Type:</dt> |
|
366 <dd> |
|
367 bool |
|
368 </dd> |
|
369 </dl> |
|
370 <dl> |
|
371 |
|
372 <dt>Raises <b>ValueError</b>:</dt> |
|
373 <dd> |
|
374 raised for an illegal modes list |
|
375 </dd> |
|
376 </dl> |
|
377 <a NAME="EricServerFileSystemInterface.basename" ID="EricServerFileSystemInterface.basename"></a> |
|
378 <h4>EricServerFileSystemInterface.basename</h4> |
|
379 <b>basename</b>(<i>p</i>) |
|
380 <p> |
|
381 Public method to extract the final component of a path name. |
|
382 </p> |
|
383 |
|
384 <dl> |
|
385 |
|
386 <dt><i>p</i> (str)</dt> |
|
387 <dd> |
|
388 path name |
|
389 </dd> |
|
390 </dl> |
|
391 <dl> |
|
392 <dt>Return:</dt> |
|
393 <dd> |
|
394 final component |
|
395 </dd> |
|
396 </dl> |
|
397 <dl> |
|
398 <dt>Return Type:</dt> |
|
399 <dd> |
|
400 str |
|
401 </dd> |
|
402 </dl> |
|
403 <a NAME="EricServerFileSystemInterface.callback" ID="EricServerFileSystemInterface.callback"></a> |
|
404 <h4>EricServerFileSystemInterface.callback</h4> |
|
405 <b>callback</b>(<i>params</i>) |
|
406 <p> |
|
407 Function to handle the server reply |
|
408 </p> |
|
409 |
|
410 <dl> |
|
411 |
|
412 <dt><i>reply</i> (str)</dt> |
|
413 <dd> |
|
414 name of the server reply |
|
415 </dd> |
|
416 <dt><i>params</i> (dict)</dt> |
|
417 <dd> |
|
418 dictionary containing the reply data |
|
419 </dd> |
|
420 </dl> |
|
421 <a NAME="EricServerFileSystemInterface.chdir" ID="EricServerFileSystemInterface.chdir"></a> |
|
422 <h4>EricServerFileSystemInterface.chdir</h4> |
|
423 <b>chdir</b>(<i>directory</i>) |
|
424 <p> |
|
425 Public method to change the current working directory of the eric-ide server. |
|
426 </p> |
|
427 |
|
428 <dl> |
|
429 |
|
430 <dt><i>directory</i> (str)</dt> |
|
431 <dd> |
|
432 absolute path of the working directory to change to |
|
433 </dd> |
|
434 </dl> |
|
435 <dl> |
|
436 <dt>Return:</dt> |
|
437 <dd> |
|
438 tuple containing an OK flag and an error string in case of an issue |
|
439 </dd> |
|
440 </dl> |
|
441 <dl> |
|
442 <dt>Return Type:</dt> |
|
443 <dd> |
|
444 tuple of (bool, str) |
|
445 </dd> |
|
446 </dl> |
|
447 <a NAME="EricServerFileSystemInterface.compactPath" ID="EricServerFileSystemInterface.compactPath"></a> |
|
448 <h4>EricServerFileSystemInterface.compactPath</h4> |
|
449 <b>compactPath</b>(<i>longPath, width, measure=len</i>) |
|
450 <p> |
|
451 Public method to return a compacted path fitting inside the given width. |
|
452 </p> |
|
453 |
|
454 <dl> |
|
455 |
|
456 <dt><i>longPath</i> (str)</dt> |
|
457 <dd> |
|
458 path to be compacted |
|
459 </dd> |
|
460 <dt><i>width</i> (int)</dt> |
|
461 <dd> |
|
462 width for the compacted path |
|
463 </dd> |
|
464 <dt><i>measure</i> (function (optional))</dt> |
|
465 <dd> |
|
466 reference to a function used to measure the length of the |
|
467 string (defaults to len) |
|
468 </dd> |
|
469 </dl> |
|
470 <dl> |
|
471 <dt>Return:</dt> |
|
472 <dd> |
|
473 compacted path |
|
474 </dd> |
|
475 </dl> |
|
476 <dl> |
|
477 <dt>Return Type:</dt> |
|
478 <dd> |
|
479 str |
|
480 </dd> |
|
481 </dl> |
|
482 <a NAME="EricServerFileSystemInterface.direntries" ID="EricServerFileSystemInterface.direntries"></a> |
|
483 <h4>EricServerFileSystemInterface.direntries</h4> |
|
484 <b>direntries</b>(<i>directory, filesonly=False, pattern=None, followsymlinks=True, ignore=None, recursive=True, dirsonly=False, </i>) |
|
485 <p> |
|
486 Public method to get a list of all files and directories of a given directory. |
|
487 </p> |
|
488 |
|
489 <dl> |
|
490 |
|
491 <dt><i>directory</i> (str)</dt> |
|
492 <dd> |
|
493 root of the tree to check |
|
494 </dd> |
|
495 <dt><i>filesonly</i> (bool (optional))</dt> |
|
496 <dd> |
|
497 flag indicating that only files are wanted (defaults to False) |
|
498 </dd> |
|
499 <dt><i>pattern</i> (str or list of str (optional))</dt> |
|
500 <dd> |
|
501 a filename pattern or list of filename patterns to check |
|
502 against (defaults to None) |
|
503 </dd> |
|
504 <dt><i>followsymlinks</i> (bool (optional))</dt> |
|
505 <dd> |
|
506 flag indicating whether symbolic links should be |
|
507 followed (defaults to True) |
|
508 </dd> |
|
509 <dt><i>ignore</i> (list of str (optional))</dt> |
|
510 <dd> |
|
511 list of entries to be ignored (defaults to None) |
|
512 </dd> |
|
513 <dt><i>recursive</i> (bool (optional))</dt> |
|
514 <dd> |
|
515 flag indicating a recursive search (defaults to True) |
|
516 </dd> |
|
517 <dt><i>dirsonly</i> (bool)</dt> |
|
518 <dd> |
|
519 flag indicating to return only directories. When True it has |
|
520 precedence over the 'filesonly' parameter (defaults to False) |
|
521 </dd> |
|
522 </dl> |
|
523 <dl> |
|
524 <dt>Return:</dt> |
|
525 <dd> |
|
526 list of all files and directories in the tree rooted at path. |
|
527 The names are expanded to start with the given directory name. |
|
528 </dd> |
|
529 </dl> |
|
530 <dl> |
|
531 <dt>Return Type:</dt> |
|
532 <dd> |
|
533 list of str |
|
534 </dd> |
|
535 </dl> |
|
536 <dl> |
|
537 |
|
538 <dt>Raises <b>OSError</b>:</dt> |
|
539 <dd> |
|
540 raised in case the server reported an issue |
|
541 </dd> |
|
542 </dl> |
|
543 <a NAME="EricServerFileSystemInterface.dirname" ID="EricServerFileSystemInterface.dirname"></a> |
|
544 <h4>EricServerFileSystemInterface.dirname</h4> |
|
545 <b>dirname</b>(<i>p</i>) |
|
546 <p> |
|
547 Public method to extract the directory component of a path name. |
|
548 </p> |
|
549 |
|
550 <dl> |
|
551 |
|
552 <dt><i>p</i> (str)</dt> |
|
553 <dd> |
|
554 path name |
|
555 </dd> |
|
556 </dl> |
|
557 <dl> |
|
558 <dt>Return:</dt> |
|
559 <dd> |
|
560 directory component |
|
561 </dd> |
|
562 </dl> |
|
563 <dl> |
|
564 <dt>Return Type:</dt> |
|
565 <dd> |
|
566 str |
|
567 </dd> |
|
568 </dl> |
|
569 <a NAME="EricServerFileSystemInterface.exists" ID="EricServerFileSystemInterface.exists"></a> |
|
570 <h4>EricServerFileSystemInterface.exists</h4> |
|
571 <b>exists</b>(<i>name</i>) |
|
572 <p> |
|
573 Public method the existence of a file or directory. |
|
574 </p> |
|
575 |
|
576 <dl> |
|
577 |
|
578 <dt><i>name</i> (str)</dt> |
|
579 <dd> |
|
580 name of the file or directory |
|
581 </dd> |
|
582 </dl> |
|
583 <dl> |
|
584 <dt>Return:</dt> |
|
585 <dd> |
|
586 flag indicating the file existence |
|
587 </dd> |
|
588 </dl> |
|
589 <dl> |
|
590 <dt>Return Type:</dt> |
|
591 <dd> |
|
592 bool |
|
593 </dd> |
|
594 </dl> |
|
595 <a NAME="EricServerFileSystemInterface.expanduser" ID="EricServerFileSystemInterface.expanduser"></a> |
|
596 <h4>EricServerFileSystemInterface.expanduser</h4> |
|
597 <b>expanduser</b>(<i>name</i>) |
|
598 <p> |
|
599 Public method to expand an initial '~' or '~user' component. |
|
600 </p> |
|
601 |
|
602 <dl> |
|
603 |
|
604 <dt><i>name</i> (str)</dt> |
|
605 <dd> |
|
606 path name to be expanded |
|
607 </dd> |
|
608 </dl> |
|
609 <dl> |
|
610 <dt>Return:</dt> |
|
611 <dd> |
|
612 expanded path name |
|
613 </dd> |
|
614 </dl> |
|
615 <dl> |
|
616 <dt>Return Type:</dt> |
|
617 <dd> |
|
618 str |
|
619 </dd> |
|
620 </dl> |
|
621 <a NAME="EricServerFileSystemInterface.fromNativeSeparators" ID="EricServerFileSystemInterface.fromNativeSeparators"></a> |
|
622 <h4>EricServerFileSystemInterface.fromNativeSeparators</h4> |
|
623 <b>fromNativeSeparators</b>(<i>p</i>) |
|
624 <p> |
|
625 Public method to convert a path using server native separator characters to |
|
626 use "/" separator characters. |
|
627 </p> |
|
628 |
|
629 <dl> |
|
630 |
|
631 <dt><i>p</i> (str)</dt> |
|
632 <dd> |
|
633 path name to be converted |
|
634 </dd> |
|
635 </dl> |
|
636 <dl> |
|
637 <dt>Return:</dt> |
|
638 <dd> |
|
639 path name with converted separator characters |
|
640 </dd> |
|
641 </dl> |
|
642 <dl> |
|
643 <dt>Return Type:</dt> |
|
644 <dd> |
|
645 str |
|
646 </dd> |
|
647 </dl> |
|
648 <a NAME="EricServerFileSystemInterface.getcwd" ID="EricServerFileSystemInterface.getcwd"></a> |
|
649 <h4>EricServerFileSystemInterface.getcwd</h4> |
|
650 <b>getcwd</b>(<i></i>) |
|
651 <p> |
|
652 Public method to get the current working directory of the eric-ide server. |
|
653 </p> |
|
654 |
|
655 <dl> |
|
656 <dt>Return:</dt> |
|
657 <dd> |
|
658 current working directory of the eric-ide server |
|
659 </dd> |
|
660 </dl> |
|
661 <dl> |
|
662 <dt>Return Type:</dt> |
|
663 <dd> |
|
664 str |
|
665 </dd> |
|
666 </dl> |
|
667 <a NAME="EricServerFileSystemInterface.glob" ID="EricServerFileSystemInterface.glob"></a> |
|
668 <h4>EricServerFileSystemInterface.glob</h4> |
|
669 <b>glob</b>(<i>pathname, recursive=False, includeHidden=False</i>) |
|
670 <p> |
|
671 Public method to get a list of of all files matching a given pattern |
|
672 like 'glob.glob()'. |
|
673 </p> |
|
674 |
|
675 <dl> |
|
676 |
|
677 <dt><i>pathname</i> (str)</dt> |
|
678 <dd> |
|
679 path name pattern with simple shell-style wildcards |
|
680 </dd> |
|
681 <dt><i>recursive</i> (bool (optional))</dt> |
|
682 <dd> |
|
683 flag indicating a recursive list (defaults to False) |
|
684 </dd> |
|
685 <dt><i>includeHidden</i> (bool (optional))</dt> |
|
686 <dd> |
|
687 flag indicating to include hidden files (defaults to False) |
|
688 </dd> |
|
689 </dl> |
|
690 <dl> |
|
691 <dt>Return:</dt> |
|
692 <dd> |
|
693 list of all files matching the pattern |
|
694 </dd> |
|
695 </dl> |
|
696 <dl> |
|
697 <dt>Return Type:</dt> |
|
698 <dd> |
|
699 list of str |
|
700 </dd> |
|
701 </dl> |
|
702 <a NAME="EricServerFileSystemInterface.isabs" ID="EricServerFileSystemInterface.isabs"></a> |
|
703 <h4>EricServerFileSystemInterface.isabs</h4> |
|
704 <b>isabs</b>(<i>p</i>) |
|
705 <p> |
|
706 Public method to chack a path for being an absolute path. |
|
707 </p> |
|
708 |
|
709 <dl> |
|
710 |
|
711 <dt><i>p</i> (str)</dt> |
|
712 <dd> |
|
713 path to be checked |
|
714 </dd> |
|
715 </dl> |
|
716 <dl> |
|
717 <dt>Return:</dt> |
|
718 <dd> |
|
719 flag indicating an absolute path |
|
720 </dd> |
|
721 </dl> |
|
722 <dl> |
|
723 <dt>Return Type:</dt> |
|
724 <dd> |
|
725 bool |
|
726 </dd> |
|
727 </dl> |
|
728 <a NAME="EricServerFileSystemInterface.isdir" ID="EricServerFileSystemInterface.isdir"></a> |
|
729 <h4>EricServerFileSystemInterface.isdir</h4> |
|
730 <b>isdir</b>(<i>name</i>) |
|
731 <p> |
|
732 Public method to check, if the given name is a directory. |
|
733 </p> |
|
734 |
|
735 <dl> |
|
736 |
|
737 <dt><i>name</i> (str)</dt> |
|
738 <dd> |
|
739 name to be checked |
|
740 </dd> |
|
741 </dl> |
|
742 <dl> |
|
743 <dt>Return:</dt> |
|
744 <dd> |
|
745 flag indicating a directory |
|
746 </dd> |
|
747 </dl> |
|
748 <dl> |
|
749 <dt>Return Type:</dt> |
|
750 <dd> |
|
751 bool |
|
752 </dd> |
|
753 </dl> |
|
754 <a NAME="EricServerFileSystemInterface.isfile" ID="EricServerFileSystemInterface.isfile"></a> |
|
755 <h4>EricServerFileSystemInterface.isfile</h4> |
|
756 <b>isfile</b>(<i>name</i>) |
|
757 <p> |
|
758 Public method to check, if the given name is a regular file. |
|
759 </p> |
|
760 |
|
761 <dl> |
|
762 |
|
763 <dt><i>name</i> (str)</dt> |
|
764 <dd> |
|
765 name to be checked |
|
766 </dd> |
|
767 </dl> |
|
768 <dl> |
|
769 <dt>Return:</dt> |
|
770 <dd> |
|
771 flag indicating a regular file |
|
772 </dd> |
|
773 </dl> |
|
774 <dl> |
|
775 <dt>Return Type:</dt> |
|
776 <dd> |
|
777 bool |
|
778 </dd> |
|
779 </dl> |
|
780 <a NAME="EricServerFileSystemInterface.join" ID="EricServerFileSystemInterface.join"></a> |
|
781 <h4>EricServerFileSystemInterface.join</h4> |
|
782 <b>join</b>(<i>a, *p</i>) |
|
783 <p> |
|
784 Public method to join two or more path name components using the path separator |
|
785 of the server side. |
|
786 </p> |
|
787 |
|
788 <dl> |
|
789 |
|
790 <dt><i>a</i> (str)</dt> |
|
791 <dd> |
|
792 first path component |
|
793 </dd> |
|
794 <dt><i>*p</i> (list of str)</dt> |
|
795 <dd> |
|
796 list of additional path components |
|
797 </dd> |
|
798 </dl> |
|
799 <dl> |
|
800 <dt>Return:</dt> |
|
801 <dd> |
|
802 joined path name |
|
803 </dd> |
|
804 </dl> |
|
805 <dl> |
|
806 <dt>Return Type:</dt> |
|
807 <dd> |
|
808 str |
|
809 </dd> |
|
810 </dl> |
|
811 <a NAME="EricServerFileSystemInterface.listdir" ID="EricServerFileSystemInterface.listdir"></a> |
|
812 <h4>EricServerFileSystemInterface.listdir</h4> |
|
813 <b>listdir</b>(<i>directory="", recursive=False</i>) |
|
814 <p> |
|
815 Public method to get a directory listing. |
|
816 </p> |
|
817 |
|
818 <dl> |
|
819 |
|
820 <dt><i>directory</i> (str (optional))</dt> |
|
821 <dd> |
|
822 directory to be listed. An empty directory means to list |
|
823 the eric-ide server current directory. (defaults to "") |
|
824 </dd> |
|
825 <dt><i>recursive</i> (bool (optional))</dt> |
|
826 <dd> |
|
827 flag indicating a recursive listing (defaults to False) |
|
828 </dd> |
|
829 </dl> |
|
830 <dl> |
|
831 <dt>Return:</dt> |
|
832 <dd> |
|
833 tuple containing the listed directory, the path separator and the |
|
834 directory listing. Each directory listing entry contains a dictionary |
|
835 with the relevant data. |
|
836 </dd> |
|
837 </dl> |
|
838 <dl> |
|
839 <dt>Return Type:</dt> |
|
840 <dd> |
|
841 tuple of (str, str, dict) |
|
842 </dd> |
|
843 </dl> |
|
844 <dl> |
|
845 |
|
846 <dt>Raises <b>OSError</b>:</dt> |
|
847 <dd> |
|
848 raised in case the server reported an issue |
|
849 </dd> |
|
850 </dl> |
|
851 <a NAME="EricServerFileSystemInterface.makedirs" ID="EricServerFileSystemInterface.makedirs"></a> |
|
852 <h4>EricServerFileSystemInterface.makedirs</h4> |
|
853 <b>makedirs</b>(<i>directory, exist_ok=False</i>) |
|
854 <p> |
|
855 Public method to create a new directory on the eric-ide serverincluding all |
|
856 intermediate-level directories. |
|
857 </p> |
|
858 |
|
859 <dl> |
|
860 |
|
861 <dt><i>directory</i> (str)</dt> |
|
862 <dd> |
|
863 absolute path of the new directory |
|
864 </dd> |
|
865 <dt><i>exist_ok</i> (bool (optional))</dt> |
|
866 <dd> |
|
867 flag indicating that the existence of the directory is |
|
868 acceptable (defaults to False) |
|
869 </dd> |
|
870 </dl> |
|
871 <dl> |
|
872 <dt>Return:</dt> |
|
873 <dd> |
|
874 tuple containing an OK flag and an error string in case of an issue |
|
875 </dd> |
|
876 </dl> |
|
877 <dl> |
|
878 <dt>Return Type:</dt> |
|
879 <dd> |
|
880 tuple of (bool, str) |
|
881 </dd> |
|
882 </dl> |
|
883 <a NAME="EricServerFileSystemInterface.mkdir" ID="EricServerFileSystemInterface.mkdir"></a> |
|
884 <h4>EricServerFileSystemInterface.mkdir</h4> |
|
885 <b>mkdir</b>(<i>directory</i>) |
|
886 <p> |
|
887 Public method to create a new directory on the eric-ide server. |
|
888 </p> |
|
889 |
|
890 <dl> |
|
891 |
|
892 <dt><i>directory</i> (str)</dt> |
|
893 <dd> |
|
894 absolute path of the new directory |
|
895 </dd> |
|
896 </dl> |
|
897 <dl> |
|
898 <dt>Return:</dt> |
|
899 <dd> |
|
900 tuple containing an OK flag and an error string in case of an issue |
|
901 </dd> |
|
902 </dl> |
|
903 <dl> |
|
904 <dt>Return Type:</dt> |
|
905 <dd> |
|
906 tuple of (bool, str) |
|
907 </dd> |
|
908 </dl> |
|
909 <a NAME="EricServerFileSystemInterface.populateFsCache" ID="EricServerFileSystemInterface.populateFsCache"></a> |
|
910 <h4>EricServerFileSystemInterface.populateFsCache</h4> |
|
911 <b>populateFsCache</b>(<i>directory</i>) |
|
912 <p> |
|
913 Public method to populate the remote file system cache for a given directory. |
|
914 </p> |
|
915 |
|
916 <dl> |
|
917 |
|
918 <dt><i>directory</i> (str)</dt> |
|
919 <dd> |
|
920 remote directory to be cached |
|
921 </dd> |
|
922 </dl> |
|
923 <dl> |
|
924 |
|
925 <dt>Raises <b>ValueError</b>:</dt> |
|
926 <dd> |
|
927 raised to indicate an empty directory |
|
928 </dd> |
|
929 </dl> |
|
930 <a NAME="EricServerFileSystemInterface.readEncodedFile" ID="EricServerFileSystemInterface.readEncodedFile"></a> |
|
931 <h4>EricServerFileSystemInterface.readEncodedFile</h4> |
|
932 <b>readEncodedFile</b>(<i>filename, create=False</i>) |
|
933 <p> |
|
934 Public method to read a file and decode its contents into proper text. |
|
935 </p> |
|
936 |
|
937 <dl> |
|
938 |
|
939 <dt><i>filename</i> (str)</dt> |
|
940 <dd> |
|
941 name of the file to read |
|
942 </dd> |
|
943 <dt><i>create</i> (bool (optional))</dt> |
|
944 <dd> |
|
945 flag indicating to create an empty file, if it does not exist |
|
946 (defaults to False) |
|
947 </dd> |
|
948 </dl> |
|
949 <dl> |
|
950 <dt>Return:</dt> |
|
951 <dd> |
|
952 tuple of decoded text and encoding |
|
953 </dd> |
|
954 </dl> |
|
955 <dl> |
|
956 <dt>Return Type:</dt> |
|
957 <dd> |
|
958 tuple of (str, str) |
|
959 </dd> |
|
960 </dl> |
|
961 <a NAME="EricServerFileSystemInterface.readEncodedFileWithEncoding" ID="EricServerFileSystemInterface.readEncodedFileWithEncoding"></a> |
|
962 <h4>EricServerFileSystemInterface.readEncodedFileWithEncoding</h4> |
|
963 <b>readEncodedFileWithEncoding</b>(<i>filename, encoding, create=False</i>) |
|
964 <p> |
|
965 Public method to read a file and decode its contents into proper text. |
|
966 </p> |
|
967 |
|
968 <dl> |
|
969 |
|
970 <dt><i>filename</i> (str)</dt> |
|
971 <dd> |
|
972 name of the file to read |
|
973 </dd> |
|
974 <dt><i>encoding</i> (str)</dt> |
|
975 <dd> |
|
976 encoding to be used to read the file |
|
977 </dd> |
|
978 <dt><i>create</i> (bool (optional))</dt> |
|
979 <dd> |
|
980 flag indicating to create an empty file, if it does not exist |
|
981 (defaults to False) |
|
982 </dd> |
|
983 </dl> |
|
984 <dl> |
|
985 <dt>Return:</dt> |
|
986 <dd> |
|
987 tuple of decoded text and encoding |
|
988 </dd> |
|
989 </dl> |
|
990 <dl> |
|
991 <dt>Return Type:</dt> |
|
992 <dd> |
|
993 tuple of (str, str) |
|
994 </dd> |
|
995 </dl> |
|
996 <a NAME="EricServerFileSystemInterface.readFile" ID="EricServerFileSystemInterface.readFile"></a> |
|
997 <h4>EricServerFileSystemInterface.readFile</h4> |
|
998 <b>readFile</b>(<i>filename, create=False, newline=None</i>) |
|
999 <p> |
|
1000 Public method to read a file from the eric-ide server. |
|
1001 </p> |
|
1002 |
|
1003 <dl> |
|
1004 |
|
1005 <dt><i>filename</i> (str)</dt> |
|
1006 <dd> |
|
1007 name of the file to read |
|
1008 </dd> |
|
1009 <dt><i>create</i> (bool (optional))</dt> |
|
1010 <dd> |
|
1011 flag indicating to create an empty file, if it does not exist |
|
1012 (defaults to False) |
|
1013 </dd> |
|
1014 <dt><i>newline</i> (str (optional))</dt> |
|
1015 <dd> |
|
1016 determines how to parse newline characters from the stream |
|
1017 (defaults to None) |
|
1018 </dd> |
|
1019 </dl> |
|
1020 <dl> |
|
1021 <dt>Return:</dt> |
|
1022 <dd> |
|
1023 bytes data read from the eric-ide server |
|
1024 </dd> |
|
1025 </dl> |
|
1026 <dl> |
|
1027 <dt>Return Type:</dt> |
|
1028 <dd> |
|
1029 bytes |
|
1030 </dd> |
|
1031 </dl> |
|
1032 <dl> |
|
1033 |
|
1034 <dt>Raises <b>EricServerNotConnectedError</b>:</dt> |
|
1035 <dd> |
|
1036 raised to indicate a missing server |
|
1037 connection |
|
1038 </dd> |
|
1039 <dt>Raises <b>OSError</b>:</dt> |
|
1040 <dd> |
|
1041 raised in case the server reported an issue |
|
1042 </dd> |
|
1043 </dl> |
|
1044 <a NAME="EricServerFileSystemInterface.remove" ID="EricServerFileSystemInterface.remove"></a> |
|
1045 <h4>EricServerFileSystemInterface.remove</h4> |
|
1046 <b>remove</b>(<i>filename</i>) |
|
1047 <p> |
|
1048 Public method to delete a file on the eric-ide server. |
|
1049 </p> |
|
1050 |
|
1051 <dl> |
|
1052 |
|
1053 <dt><i>filename</i> (str)</dt> |
|
1054 <dd> |
|
1055 absolute path of the file |
|
1056 </dd> |
|
1057 </dl> |
|
1058 <dl> |
|
1059 <dt>Return:</dt> |
|
1060 <dd> |
|
1061 tuple containing an OK flag and an error string in case of an issue |
|
1062 </dd> |
|
1063 </dl> |
|
1064 <dl> |
|
1065 <dt>Return Type:</dt> |
|
1066 <dd> |
|
1067 tuple of (bool, str) |
|
1068 </dd> |
|
1069 </dl> |
|
1070 <a NAME="EricServerFileSystemInterface.removeFromFsCache" ID="EricServerFileSystemInterface.removeFromFsCache"></a> |
|
1071 <h4>EricServerFileSystemInterface.removeFromFsCache</h4> |
|
1072 <b>removeFromFsCache</b>(<i>directory</i>) |
|
1073 <p> |
|
1074 Public method to remove a given directory from the remote file system cache. |
|
1075 </p> |
|
1076 |
|
1077 <dl> |
|
1078 |
|
1079 <dt><i>directory</i> (str)</dt> |
|
1080 <dd> |
|
1081 remote directory to be removed |
|
1082 </dd> |
|
1083 </dl> |
|
1084 <a NAME="EricServerFileSystemInterface.replace" ID="EricServerFileSystemInterface.replace"></a> |
|
1085 <h4>EricServerFileSystemInterface.replace</h4> |
|
1086 <b>replace</b>(<i>oldName, newName</i>) |
|
1087 <p> |
|
1088 Public method to rename a file or directory. |
|
1089 </p> |
|
1090 |
|
1091 <dl> |
|
1092 |
|
1093 <dt><i>oldName</i> (str)</dt> |
|
1094 <dd> |
|
1095 current name of the file or directory |
|
1096 </dd> |
|
1097 <dt><i>newName</i> (str)</dt> |
|
1098 <dd> |
|
1099 new name for the file or directory |
|
1100 </dd> |
|
1101 </dl> |
|
1102 <dl> |
|
1103 <dt>Return:</dt> |
|
1104 <dd> |
|
1105 tuple containing an OK flag and an error string in case of an issue |
|
1106 </dd> |
|
1107 </dl> |
|
1108 <dl> |
|
1109 <dt>Return Type:</dt> |
|
1110 <dd> |
|
1111 tuple of (bool, str) |
|
1112 </dd> |
|
1113 </dl> |
|
1114 <a NAME="EricServerFileSystemInterface.rmdir" ID="EricServerFileSystemInterface.rmdir"></a> |
|
1115 <h4>EricServerFileSystemInterface.rmdir</h4> |
|
1116 <b>rmdir</b>(<i>directory</i>) |
|
1117 <p> |
|
1118 Public method to delete a directory on the eric-ide server. |
|
1119 </p> |
|
1120 |
|
1121 <dl> |
|
1122 |
|
1123 <dt><i>directory</i> (str)</dt> |
|
1124 <dd> |
|
1125 absolute path of the directory |
|
1126 </dd> |
|
1127 </dl> |
|
1128 <dl> |
|
1129 <dt>Return:</dt> |
|
1130 <dd> |
|
1131 tuple containing an OK flag and an error string in case of an issue |
|
1132 </dd> |
|
1133 </dl> |
|
1134 <dl> |
|
1135 <dt>Return Type:</dt> |
|
1136 <dd> |
|
1137 tuple of (bool, str) |
|
1138 </dd> |
|
1139 </dl> |
|
1140 <a NAME="EricServerFileSystemInterface.separator" ID="EricServerFileSystemInterface.separator"></a> |
|
1141 <h4>EricServerFileSystemInterface.separator</h4> |
|
1142 <b>separator</b>(<i></i>) |
|
1143 <p> |
|
1144 Public method to return the server side path separator string. |
|
1145 </p> |
|
1146 |
|
1147 <dl> |
|
1148 <dt>Return:</dt> |
|
1149 <dd> |
|
1150 path separator |
|
1151 </dd> |
|
1152 </dl> |
|
1153 <dl> |
|
1154 <dt>Return Type:</dt> |
|
1155 <dd> |
|
1156 str |
|
1157 </dd> |
|
1158 </dl> |
|
1159 <a NAME="EricServerFileSystemInterface.shutilCopy" ID="EricServerFileSystemInterface.shutilCopy"></a> |
|
1160 <h4>EricServerFileSystemInterface.shutilCopy</h4> |
|
1161 <b>shutilCopy</b>(<i>srcName, dstName</i>) |
|
1162 <p> |
|
1163 Public method to copy a source file to a given destination file or directory. |
|
1164 </p> |
|
1165 |
|
1166 <dl> |
|
1167 |
|
1168 <dt><i>srcName</i> (str)</dt> |
|
1169 <dd> |
|
1170 name of the source file |
|
1171 </dd> |
|
1172 <dt><i>dstName</i> (str)</dt> |
|
1173 <dd> |
|
1174 name of the destination file or directory |
|
1175 </dd> |
|
1176 </dl> |
|
1177 <dl> |
|
1178 <dt>Return:</dt> |
|
1179 <dd> |
|
1180 name of the destination file |
|
1181 </dd> |
|
1182 </dl> |
|
1183 <dl> |
|
1184 <dt>Return Type:</dt> |
|
1185 <dd> |
|
1186 str |
|
1187 </dd> |
|
1188 </dl> |
|
1189 <dl> |
|
1190 |
|
1191 <dt>Raises <b>EricServerNotConnectedError</b>:</dt> |
|
1192 <dd> |
|
1193 raised to indicate a missing server |
|
1194 connection |
|
1195 </dd> |
|
1196 <dt>Raises <b>OSError</b>:</dt> |
|
1197 <dd> |
|
1198 raised to indicate an issue |
|
1199 </dd> |
|
1200 </dl> |
|
1201 <a NAME="EricServerFileSystemInterface.shutilRmtree" ID="EricServerFileSystemInterface.shutilRmtree"></a> |
|
1202 <h4>EricServerFileSystemInterface.shutilRmtree</h4> |
|
1203 <b>shutilRmtree</b>(<i>pathname, ignore_errors=False</i>) |
|
1204 <p> |
|
1205 Public method to delete an entire directory tree. |
|
1206 </p> |
|
1207 |
|
1208 <dl> |
|
1209 |
|
1210 <dt><i>pathname</i> (str)</dt> |
|
1211 <dd> |
|
1212 name of the directory to be deleted |
|
1213 </dd> |
|
1214 <dt><i>ignore_errors</i> (bool (optional))</dt> |
|
1215 <dd> |
|
1216 flag indicating to ignore error resulting from failed |
|
1217 removals (defaults to False) |
|
1218 </dd> |
|
1219 </dl> |
|
1220 <dl> |
|
1221 |
|
1222 <dt>Raises <b>EricServerNotConnectedError</b>:</dt> |
|
1223 <dd> |
|
1224 raised to indicate a missing server |
|
1225 connection |
|
1226 </dd> |
|
1227 <dt>Raises <b>OSError</b>:</dt> |
|
1228 <dd> |
|
1229 raised to indicate an issue |
|
1230 </dd> |
|
1231 </dl> |
|
1232 <a NAME="EricServerFileSystemInterface.split" ID="EricServerFileSystemInterface.split"></a> |
|
1233 <h4>EricServerFileSystemInterface.split</h4> |
|
1234 <b>split</b>(<i>p</i>) |
|
1235 <p> |
|
1236 Public method to split a path name. |
|
1237 </p> |
|
1238 |
|
1239 <dl> |
|
1240 |
|
1241 <dt><i>p</i> (str)</dt> |
|
1242 <dd> |
|
1243 path name to be split |
|
1244 </dd> |
|
1245 </dl> |
|
1246 <dl> |
|
1247 <dt>Return:</dt> |
|
1248 <dd> |
|
1249 tuple containing head and tail, where tail is everything after the last |
|
1250 path separator. |
|
1251 </dd> |
|
1252 </dl> |
|
1253 <dl> |
|
1254 <dt>Return Type:</dt> |
|
1255 <dd> |
|
1256 tuple of (str, str) |
|
1257 </dd> |
|
1258 </dl> |
|
1259 <a NAME="EricServerFileSystemInterface.splitdrive" ID="EricServerFileSystemInterface.splitdrive"></a> |
|
1260 <h4>EricServerFileSystemInterface.splitdrive</h4> |
|
1261 <b>splitdrive</b>(<i>p</i>) |
|
1262 <p> |
|
1263 Public method to split a path into drive and path. |
|
1264 </p> |
|
1265 |
|
1266 <dl> |
|
1267 |
|
1268 <dt><i>p</i> (str)</dt> |
|
1269 <dd> |
|
1270 path name to be split |
|
1271 </dd> |
|
1272 </dl> |
|
1273 <dl> |
|
1274 <dt>Return:</dt> |
|
1275 <dd> |
|
1276 tuple containing the drive letter (incl. colon) and the path |
|
1277 </dd> |
|
1278 </dl> |
|
1279 <dl> |
|
1280 <dt>Return Type:</dt> |
|
1281 <dd> |
|
1282 tuple of (str, str) |
|
1283 </dd> |
|
1284 </dl> |
|
1285 <a NAME="EricServerFileSystemInterface.splitext" ID="EricServerFileSystemInterface.splitext"></a> |
|
1286 <h4>EricServerFileSystemInterface.splitext</h4> |
|
1287 <b>splitext</b>(<i>p</i>) |
|
1288 <p> |
|
1289 Public method to split a path name into a root part and an extension. |
|
1290 </p> |
|
1291 |
|
1292 <dl> |
|
1293 |
|
1294 <dt><i>p</i> (str)</dt> |
|
1295 <dd> |
|
1296 path name to be split |
|
1297 </dd> |
|
1298 </dl> |
|
1299 <dl> |
|
1300 <dt>Return:</dt> |
|
1301 <dd> |
|
1302 tuple containing the root part and the extension |
|
1303 </dd> |
|
1304 </dl> |
|
1305 <dl> |
|
1306 <dt>Return Type:</dt> |
|
1307 <dd> |
|
1308 tuple of (str, str) |
|
1309 </dd> |
|
1310 </dl> |
|
1311 <a NAME="EricServerFileSystemInterface.stat" ID="EricServerFileSystemInterface.stat"></a> |
|
1312 <h4>EricServerFileSystemInterface.stat</h4> |
|
1313 <b>stat</b>(<i>filename, stNames</i>) |
|
1314 <p> |
|
1315 Public method to get the status of a file. |
|
1316 </p> |
|
1317 |
|
1318 <dl> |
|
1319 |
|
1320 <dt><i>filename</i> (str)</dt> |
|
1321 <dd> |
|
1322 name of the file |
|
1323 </dd> |
|
1324 <dt><i>stNames</i> (list of str)</dt> |
|
1325 <dd> |
|
1326 list of 'stat_result' members to retrieve |
|
1327 </dd> |
|
1328 </dl> |
|
1329 <dl> |
|
1330 <dt>Return:</dt> |
|
1331 <dd> |
|
1332 dictionary containing the requested status data |
|
1333 </dd> |
|
1334 </dl> |
|
1335 <dl> |
|
1336 <dt>Return Type:</dt> |
|
1337 <dd> |
|
1338 dict |
|
1339 </dd> |
|
1340 </dl> |
|
1341 <dl> |
|
1342 |
|
1343 <dt>Raises <b>OSError</b>:</dt> |
|
1344 <dd> |
|
1345 raised in case the server reported an issue |
|
1346 </dd> |
|
1347 </dl> |
|
1348 <a NAME="EricServerFileSystemInterface.toNativeSeparators" ID="EricServerFileSystemInterface.toNativeSeparators"></a> |
|
1349 <h4>EricServerFileSystemInterface.toNativeSeparators</h4> |
|
1350 <b>toNativeSeparators</b>(<i>p</i>) |
|
1351 <p> |
|
1352 Public method to convert a path to use server native separator characters. |
|
1353 </p> |
|
1354 |
|
1355 <dl> |
|
1356 |
|
1357 <dt><i>p</i> (str)</dt> |
|
1358 <dd> |
|
1359 path name to be converted |
|
1360 </dd> |
|
1361 </dl> |
|
1362 <dl> |
|
1363 <dt>Return:</dt> |
|
1364 <dd> |
|
1365 path name with converted separator characters |
|
1366 </dd> |
|
1367 </dl> |
|
1368 <dl> |
|
1369 <dt>Return Type:</dt> |
|
1370 <dd> |
|
1371 str |
|
1372 </dd> |
|
1373 </dl> |
|
1374 <a NAME="EricServerFileSystemInterface.writeEncodedFile" ID="EricServerFileSystemInterface.writeEncodedFile"></a> |
|
1375 <h4>EricServerFileSystemInterface.writeEncodedFile</h4> |
|
1376 <b>writeEncodedFile</b>(<i>filename, text, origEncoding, forcedEncoding="", withBackup=False</i>) |
|
1377 <p> |
|
1378 Public method to write a file with properly encoded text. |
|
1379 </p> |
|
1380 |
|
1381 <dl> |
|
1382 |
|
1383 <dt><i>filename</i> (str)</dt> |
|
1384 <dd> |
|
1385 name of the file to read |
|
1386 </dd> |
|
1387 <dt><i>text</i> (str)</dt> |
|
1388 <dd> |
|
1389 text to be written |
|
1390 </dd> |
|
1391 <dt><i>origEncoding</i> (str)</dt> |
|
1392 <dd> |
|
1393 type of the original encoding |
|
1394 </dd> |
|
1395 <dt><i>forcedEncoding</i> (str (optional))</dt> |
|
1396 <dd> |
|
1397 encoding to be used for writing, if no coding |
|
1398 line is present (defaults to "") |
|
1399 </dd> |
|
1400 <dt><i>withBackup</i> (bool (optional))</dt> |
|
1401 <dd> |
|
1402 flag indicating to create a backup file first |
|
1403 (defaults to False) |
|
1404 </dd> |
|
1405 </dl> |
|
1406 <dl> |
|
1407 <dt>Return:</dt> |
|
1408 <dd> |
|
1409 encoding used for writing the file |
|
1410 </dd> |
|
1411 </dl> |
|
1412 <dl> |
|
1413 <dt>Return Type:</dt> |
|
1414 <dd> |
|
1415 str |
|
1416 </dd> |
|
1417 </dl> |
|
1418 <a NAME="EricServerFileSystemInterface.writeFile" ID="EricServerFileSystemInterface.writeFile"></a> |
|
1419 <h4>EricServerFileSystemInterface.writeFile</h4> |
|
1420 <b>writeFile</b>(<i>filename, data, withBackup=False, newline=None</i>) |
|
1421 <p> |
|
1422 Public method to write the data to a file on the eric-ide server. |
|
1423 </p> |
|
1424 |
|
1425 <dl> |
|
1426 |
|
1427 <dt><i>filename</i> (str)</dt> |
|
1428 <dd> |
|
1429 name of the file to write |
|
1430 </dd> |
|
1431 <dt><i>data</i> (bytes or QByteArray)</dt> |
|
1432 <dd> |
|
1433 data to be written |
|
1434 </dd> |
|
1435 <dt><i>withBackup</i> (bool (optional))</dt> |
|
1436 <dd> |
|
1437 flag indicating to create a backup file first |
|
1438 (defaults to False) |
|
1439 </dd> |
|
1440 <dt><i>newline</i> (str (optional))</dt> |
|
1441 <dd> |
|
1442 determines how to parse newline characters from the stream |
|
1443 (defaults to None) |
|
1444 </dd> |
|
1445 </dl> |
|
1446 <dl> |
|
1447 |
|
1448 <dt>Raises <b>EricServerNotConnectedError</b>:</dt> |
|
1449 <dd> |
|
1450 raised to indicate a missing server |
|
1451 connection |
|
1452 </dd> |
|
1453 <dt>Raises <b>OSError</b>:</dt> |
|
1454 <dd> |
|
1455 raised in case the server reported an issue |
|
1456 </dd> |
|
1457 </dl> |
|
1458 <div align="right"><a href="#top">Up</a></div> |
|
1459 <hr /> |
|
1460 <hr /> |
|
1461 <a NAME="EricServerNotConnectedError" ID="EricServerNotConnectedError"></a> |
|
1462 <h2>EricServerNotConnectedError</h2> |
|
1463 <p> |
|
1464 Class defining a special OSError indicating a missing server connection. |
|
1465 </p> |
|
1466 |
|
1467 <h3>Derived from</h3> |
|
1468 OSError |
|
1469 <h3>Class Attributes</h3> |
|
1470 <table> |
|
1471 <tr><td>None</td></tr> |
|
1472 </table> |
|
1473 |
|
1474 <h3>Class Methods</h3> |
|
1475 <table> |
|
1476 <tr><td>None</td></tr> |
|
1477 </table> |
|
1478 |
|
1479 <h3>Methods</h3> |
|
1480 <table> |
|
1481 <tr> |
|
1482 <td><a href="#EricServerNotConnectedError.__init__">EricServerNotConnectedError</a></td> |
|
1483 <td>Constructor</td> |
|
1484 </tr> |
|
1485 </table> |
|
1486 |
|
1487 <h3>Static Methods</h3> |
|
1488 <table> |
|
1489 <tr><td>None</td></tr> |
|
1490 </table> |
|
1491 |
|
1492 |
|
1493 <a NAME="EricServerNotConnectedError.__init__" ID="EricServerNotConnectedError.__init__"></a> |
|
1494 <h4>EricServerNotConnectedError (Constructor)</h4> |
|
1495 <b>EricServerNotConnectedError</b>(<i></i>) |
|
1496 <p> |
|
1497 Constructor |
|
1498 </p> |
|
1499 |
|
1500 <div align="right"><a href="#top">Up</a></div> |
|
1501 <hr /> |
|
1502 </body></html> |