eric6/Documentation/Source/eric6.MicroPython.MicroPythonFileManager.html

changeset 7145
ceb3e8b242c1
child 7174
de8175253dfc
equal deleted inserted replaced
7143:9eb66bad154d 7145:ceb3e8b242c1
1 <!DOCTYPE html>
2 <html><head>
3 <title>eric6.MicroPython.MicroPythonFileManager</title>
4 <meta charset="UTF-8">
5 <style>
6 body {
7 background: #EDECE6;
8 margin: 0em 1em 10em 1em;
9 color: black;
10 }
11
12 h1 { color: white; background: #85774A; }
13 h2 { color: white; background: #85774A; }
14 h3 { color: white; background: #9D936E; }
15 h4 { color: white; background: #9D936E; }
16
17 a { color: #BA6D36; }
18
19 </style>
20 </head>
21 <body><a NAME="top" ID="top"></a>
22 <h1>eric6.MicroPython.MicroPythonFileManager</h1>
23 <p>
24 Module implementing some file system commands for MicroPython.
25 </p>
26 <h3>Global Attributes</h3>
27 <table>
28 <tr><td>None</td></tr>
29 </table>
30 <h3>Classes</h3>
31 <table>
32 <tr>
33 <td><a href="#MicroPythonFileManager">MicroPythonFileManager</a></td>
34 <td>Class implementing an interface to the device file system commands with some additional sugar.</td>
35 </tr>
36 </table>
37 <h3>Functions</h3>
38 <table>
39 <tr><td>None</td></tr>
40 </table>
41 <hr /><hr />
42 <a NAME="MicroPythonFileManager" ID="MicroPythonFileManager"></a>
43 <h2>MicroPythonFileManager</h2>
44 <p>
45 Class implementing an interface to the device file system commands with
46 some additional sugar.
47 </p><h3>Signals</h3>
48 <dl>
49 <dt>createDirectoryDone()</dt>
50 <dd>
51 emitted after a directory was created
52 </dd><dt>currentDir(dirname)</dt>
53 <dd>
54 emitted to report the current directory of the
55 device
56 </dd><dt>currentDirChanged(dirname)</dt>
57 <dd>
58 emitted to report back a change of the
59 current directory
60 </dd><dt>deleteFileDone(deviceFile)</dt>
61 <dd>
62 emitted after the file has been deleted
63 on the connected device
64 </dd><dt>error(exc)</dt>
65 <dd>
66 emitted with a failure message to indicate a failure
67 during the most recent operation
68 </dd><dt>fsinfoDone(fsinfo)</dt>
69 <dd>
70 emitted after the file system information was
71 obtained
72 </dd><dt>getFileDone(deviceFile, localFile)</dt>
73 <dd>
74 emitted after the file was
75 fetched from the connected device and written to the local file system
76 </dd><dt>longListFiles(result)</dt>
77 <dd>
78 emitted with a tuple of tuples containing the
79 name, mode, size and time for each directory entry
80 </dd><dt>putFileDone(localFile, deviceFile)</dt>
81 <dd>
82 emitted after the file was
83 copied to the connected device
84 </dd><dt>removeDirectoryDone()</dt>
85 <dd>
86 emitted after a directory has been deleted
87 </dd><dt>rsyncDone(localName, deviceName)</dt>
88 <dd>
89 emitted after the rsync operation
90 has been completed
91 </dd><dt>rsyncProgressMessage(msg)</dt>
92 <dd>
93 emitted to send a message about what
94 rsync is doing
95 </dd>
96 </dl>
97 <h3>Derived from</h3>
98 QObject
99 <h3>Class Attributes</h3>
100 <table>
101 <tr><td>None</td></tr>
102 </table>
103 <h3>Class Methods</h3>
104 <table>
105 <tr><td>None</td></tr>
106 </table>
107 <h3>Methods</h3>
108 <table>
109 <tr>
110 <td><a href="#MicroPythonFileManager.__init__">MicroPythonFileManager</a></td>
111 <td>Constructor</td>
112 </tr><tr>
113 <td><a href="#MicroPythonFileManager.__rsync">__rsync</a></td>
114 <td>Private method to synchronize a local directory to the device.</td>
115 </tr><tr>
116 <td><a href="#MicroPythonFileManager.cd">cd</a></td>
117 <td>Public slot to change the current directory of the device.</td>
118 </tr><tr>
119 <td><a href="#MicroPythonFileManager.delete">delete</a></td>
120 <td>Public slot to delete a file on the device.</td>
121 </tr><tr>
122 <td><a href="#MicroPythonFileManager.fileSystemInfo">fileSystemInfo</a></td>
123 <td>Public method to obtain information about the currently mounted file systems.</td>
124 </tr><tr>
125 <td><a href="#MicroPythonFileManager.get">get</a></td>
126 <td>Public slot to get a file from the connected device.</td>
127 </tr><tr>
128 <td><a href="#MicroPythonFileManager.lls">lls</a></td>
129 <td>Public slot to get a long listing of the given directory.</td>
130 </tr><tr>
131 <td><a href="#MicroPythonFileManager.mkdir">mkdir</a></td>
132 <td>Public slot to create a new directory.</td>
133 </tr><tr>
134 <td><a href="#MicroPythonFileManager.put">put</a></td>
135 <td>Public slot to put a file onto the device.</td>
136 </tr><tr>
137 <td><a href="#MicroPythonFileManager.pwd">pwd</a></td>
138 <td>Public slot to get the current directory of the device.</td>
139 </tr><tr>
140 <td><a href="#MicroPythonFileManager.rmdir">rmdir</a></td>
141 <td>Public slot to (recursively) remove a directory.</td>
142 </tr><tr>
143 <td><a href="#MicroPythonFileManager.rsync">rsync</a></td>
144 <td>Public slot to synchronize a local directory to the device.</td>
145 </tr>
146 </table>
147 <h3>Static Methods</h3>
148 <table>
149 <tr><td>None</td></tr>
150 </table>
151 <a NAME="MicroPythonFileManager.__init__" ID="MicroPythonFileManager.__init__"></a>
152 <h4>MicroPythonFileManager (Constructor)</h4>
153 <b>MicroPythonFileManager</b>(<i>commandsInterface, parent=None</i>)
154 <p>
155 Constructor
156 </p><dl>
157 <dt><i>commandsInterface</i> (MicroPythonCommandsInterface)</dt>
158 <dd>
159 reference to the commands interface object
160 </dd><dt><i>parent</i> (QObject)</dt>
161 <dd>
162 reference to the parent object
163 </dd>
164 </dl><a NAME="MicroPythonFileManager.__rsync" ID="MicroPythonFileManager.__rsync"></a>
165 <h4>MicroPythonFileManager.__rsync</h4>
166 <b>__rsync</b>(<i>hostDirectory, deviceDirectory, mirror=True, localDevice=False</i>)
167 <p>
168 Private method to synchronize a local directory to the device.
169 </p><dl>
170 <dt><i>hostDirectory</i> (str)</dt>
171 <dd>
172 name of the local directory
173 </dd><dt><i>deviceDirectory</i> (str)</dt>
174 <dd>
175 name of the directory on the device
176 </dd><dt><i>mirror</i> (bool)</dt>
177 <dd>
178 flag indicating to mirror the local directory to
179 the device directory
180 </dd><dt><i>localDevice</i> (bool)</dt>
181 <dd>
182 flag indicating device access via local file system
183 </dd>
184 </dl><dl>
185 <dt>Returns:</dt>
186 <dd>
187 list of errors
188 </dd>
189 </dl><dl>
190 <dt>Return Type:</dt>
191 <dd>
192 list of str
193 </dd>
194 </dl><a NAME="MicroPythonFileManager.cd" ID="MicroPythonFileManager.cd"></a>
195 <h4>MicroPythonFileManager.cd</h4>
196 <b>cd</b>(<i>dirname</i>)
197 <p>
198 Public slot to change the current directory of the device.
199 </p><dl>
200 <dt><i>dirname</i> (str)</dt>
201 <dd>
202 name of the desired current directory
203 </dd>
204 </dl><a NAME="MicroPythonFileManager.delete" ID="MicroPythonFileManager.delete"></a>
205 <h4>MicroPythonFileManager.delete</h4>
206 <b>delete</b>(<i>deviceFileName</i>)
207 <p>
208 Public slot to delete a file on the device.
209 </p><dl>
210 <dt><i>deviceFileName</i> (str)</dt>
211 <dd>
212 name of the file on the connected device
213 </dd>
214 </dl><a NAME="MicroPythonFileManager.fileSystemInfo" ID="MicroPythonFileManager.fileSystemInfo"></a>
215 <h4>MicroPythonFileManager.fileSystemInfo</h4>
216 <b>fileSystemInfo</b>(<i></i>)
217 <p>
218 Public method to obtain information about the currently mounted file
219 systems.
220 </p><a NAME="MicroPythonFileManager.get" ID="MicroPythonFileManager.get"></a>
221 <h4>MicroPythonFileManager.get</h4>
222 <b>get</b>(<i>deviceFileName, hostFileName=""</i>)
223 <p>
224 Public slot to get a file from the connected device.
225 </p><dl>
226 <dt><i>deviceFileName</i> (str)</dt>
227 <dd>
228 name of the file on the device
229 </dd><dt><i>hostFileName</i> (str)</dt>
230 <dd>
231 name of the local file
232 </dd>
233 </dl><a NAME="MicroPythonFileManager.lls" ID="MicroPythonFileManager.lls"></a>
234 <h4>MicroPythonFileManager.lls</h4>
235 <b>lls</b>(<i>dirname, showHidden=False</i>)
236 <p>
237 Public slot to get a long listing of the given directory.
238 </p><dl>
239 <dt><i>dirname</i> (str)</dt>
240 <dd>
241 name of the directory to list
242 </dd><dt><i>showHidden</i> (bool)</dt>
243 <dd>
244 flag indicating to show hidden files as well
245 </dd>
246 </dl><a NAME="MicroPythonFileManager.mkdir" ID="MicroPythonFileManager.mkdir"></a>
247 <h4>MicroPythonFileManager.mkdir</h4>
248 <b>mkdir</b>(<i>dirname</i>)
249 <p>
250 Public slot to create a new directory.
251 </p><dl>
252 <dt><i>dirname</i> (str)</dt>
253 <dd>
254 name of the directory to create
255 </dd>
256 </dl><a NAME="MicroPythonFileManager.put" ID="MicroPythonFileManager.put"></a>
257 <h4>MicroPythonFileManager.put</h4>
258 <b>put</b>(<i>hostFileName, deviceFileName=""</i>)
259 <p>
260 Public slot to put a file onto the device.
261 </p><dl>
262 <dt><i>hostFileName</i> (str)</dt>
263 <dd>
264 name of the local file
265 </dd><dt><i>deviceFileName</i> (str)</dt>
266 <dd>
267 name of the file on the connected device
268 </dd>
269 </dl><a NAME="MicroPythonFileManager.pwd" ID="MicroPythonFileManager.pwd"></a>
270 <h4>MicroPythonFileManager.pwd</h4>
271 <b>pwd</b>(<i></i>)
272 <p>
273 Public slot to get the current directory of the device.
274 </p><a NAME="MicroPythonFileManager.rmdir" ID="MicroPythonFileManager.rmdir"></a>
275 <h4>MicroPythonFileManager.rmdir</h4>
276 <b>rmdir</b>(<i>dirname, recursive=False</i>)
277 <p>
278 Public slot to (recursively) remove a directory.
279 </p><dl>
280 <dt><i>dirname</i> (str)</dt>
281 <dd>
282 name of the directory to be removed
283 </dd><dt><i>recursive</i> (bool)</dt>
284 <dd>
285 flag indicating a recursive removal
286 </dd>
287 </dl><a NAME="MicroPythonFileManager.rsync" ID="MicroPythonFileManager.rsync"></a>
288 <h4>MicroPythonFileManager.rsync</h4>
289 <b>rsync</b>(<i>hostDirectory, deviceDirectory, mirror=True, localDevice=False</i>)
290 <p>
291 Public slot to synchronize a local directory to the device.
292 </p><dl>
293 <dt><i>hostDirectory</i> (str)</dt>
294 <dd>
295 name of the local directory
296 </dd><dt><i>deviceDirectory</i> (str)</dt>
297 <dd>
298 name of the directory on the device
299 </dd><dt><i>mirror</i> (bool)</dt>
300 <dd>
301 flag indicating to mirror the local directory to
302 the device directory
303 </dd><dt><i>localDevice</i> (bool)</dt>
304 <dd>
305 flag indicating device access via local file system
306 </dd>
307 </dl>
308 <div align="right"><a href="#top">Up</a></div>
309 <hr />
310 </body></html>

eric ide

mercurial