Debian Codegraph @

doc/html/gdbus-org.freedesktop.UDisks2.Filesystem.html

raw
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>org.freedesktop.UDisks2.Filesystem: UDisks Reference Manual</title>
6 <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
7 <link rel="home" href="index.html" title="UDisks Reference Manual">
8 <link rel="up" href="ch03.html" title="D-Bus Interfaces">
9 <link rel="prev" href="gdbus-org.freedesktop.UDisks2.PartitionTable.html" title="org.freedesktop.UDisks2.PartitionTable">
10 <link rel="next" href="gdbus-org.freedesktop.UDisks2.Swapspace.html" title="org.freedesktop.UDisks2.Swapspace">
11 <meta name="generator" content="GTK-Doc V1.35.1 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
13 </head>
14 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
16 <td width="100%" align="left" class="shortcuts">
17 <a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
18 <a href="#gdbus-org.freedesktop.UDisks2.Filesystem.description" class="shortcut">Description</a></span><span id="nav_properties">  <span class="dim">|</span> 
19 <a href="#gdbus-org.freedesktop.UDisks2.Filesystem.properties" class="shortcut">Properties</a></span>
20 </td>
21 <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
22 <td><a accesskey="u" href="ch03.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
23 <td><a accesskey="p" href="gdbus-org.freedesktop.UDisks2.PartitionTable.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
24 <td><a accesskey="n" href="gdbus-org.freedesktop.UDisks2.Swapspace.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
25 </tr></table>
26 <div class="refentry">
27 <a name="gdbus-org.freedesktop.UDisks2.Filesystem"></a><div class="titlepage"></div>
28 <div class="refnamediv"><table width="100%"><tr>
29 <td valign="top">
30 <h2><span class="refentrytitle"><a name="gdbus-interface-org-freedesktop-UDisks2-Filesystem.top_of_page"></a>org.freedesktop.UDisks2.Filesystem</span></h2>
31 <p>org.freedesktop.UDisks2.Filesystem — Block device containing a mountable filesystem</p>
32 </td>
33 <td class="gallery_image" valign="top" align="right"></td>
34 </tr></table></div>
35 <div class="refsynopsisdiv">
36 <h2>Methods</h2>
37 <pre class="synopsis">
38 <a class="link" href="gdbus-org.freedesktop.UDisks2.Filesystem.html#gdbus-method-org-freedesktop-UDisks2-Filesystem.SetLabel" title="The SetLabel() method">SetLabel</a> (IN s label,
39 IN a{sv} options);
40 <a class="link" href="gdbus-org.freedesktop.UDisks2.Filesystem.html#gdbus-method-org-freedesktop-UDisks2-Filesystem.SetUUID" title="The SetUUID() method">SetUUID</a> (IN s uuid,
41 IN a{sv} options);
42 <a class="link" href="gdbus-org.freedesktop.UDisks2.Filesystem.html#gdbus-method-org-freedesktop-UDisks2-Filesystem.Mount" title="The Mount() method">Mount</a> (IN a{sv} options,
43 OUT s mount_path);
44 <a class="link" href="gdbus-org.freedesktop.UDisks2.Filesystem.html#gdbus-method-org-freedesktop-UDisks2-Filesystem.Unmount" title="The Unmount() method">Unmount</a> (IN a{sv} options);
45 <a class="link" href="gdbus-org.freedesktop.UDisks2.Filesystem.html#gdbus-method-org-freedesktop-UDisks2-Filesystem.Resize" title="The Resize() method">Resize</a> (IN t size,
46 IN a{sv} options);
47 <a class="link" href="gdbus-org.freedesktop.UDisks2.Filesystem.html#gdbus-method-org-freedesktop-UDisks2-Filesystem.Check" title="The Check() method">Check</a> (IN a{sv} options,
48 OUT b consistent);
49 <a class="link" href="gdbus-org.freedesktop.UDisks2.Filesystem.html#gdbus-method-org-freedesktop-UDisks2-Filesystem.Repair" title="The Repair() method">Repair</a> (IN a{sv} options,
50 OUT b repaired);
51 <a class="link" href="gdbus-org.freedesktop.UDisks2.Filesystem.html#gdbus-method-org-freedesktop-UDisks2-Filesystem.TakeOwnership" title="The TakeOwnership() method">TakeOwnership</a> (IN a{sv} options);
52 </pre>
53 </div>
54 <div class="refsect1">
55 <a name="id-1.3.3.9.4"></a><h2>Properties</h2>
56 <pre class="synopsis">
57 <a class="link" href="gdbus-org.freedesktop.UDisks2.Filesystem.html#gdbus-property-org-freedesktop-UDisks2-Filesystem.MountPoints" title='The "MountPoints" property'>MountPoints</a> readable aay
58 <a class="link" href="gdbus-org.freedesktop.UDisks2.Filesystem.html#gdbus-property-org-freedesktop-UDisks2-Filesystem.Size" title='The "Size" property'>Size</a> readable t
59 </pre>
60 </div>
61 <div class="refsect1">
62 <a name="gdbus-interface-org-freedesktop-UDisks2-Filesystem"></a><h2>Description</h2>
63 <p>
64 This interface is used for <a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-interface-org-freedesktop-UDisks2-Block.top_of_page">org.freedesktop.UDisks2.Block</a>
65 devices that contain a mountable filesystem.
66 </p>
67 </div>
68 <div class="refsect1">
69 <a name="gdbus-methods-org.freedesktop.UDisks2.Filesystem"></a><h2>Method Details</h2>
70 <div class="refsect2">
71 <a name="gdbus-method-org-freedesktop-UDisks2-Filesystem.SetLabel"></a><h3>The SetLabel() method</h3>
72 <pre class="programlisting">
73 SetLabel (IN s label,
74 IN a{sv} options);
75 </pre>
76 <p>
77 Sets the filesystem label.
78 </p>
79 <div class="variablelist"><table border="0" class="variablelist">
80 <colgroup>
81 <col align="left" valign="top">
82 <col>
83 </colgroup>
84 <tbody>
85 <tr>
86 <td><p><span class="term"><code class="literal">IN s <em class="parameter"><code>label</code></em></code>:</span></p></td>
87 <td><p>
88 The label to set.
89 </p></td>
90 </tr>
91 <tr>
92 <td><p><span class="term"><code class="literal">IN a{sv} <em class="parameter"><code>options</code></em></code>:</span></p></td>
93 <td><p>
94 Options (currently unused except for <a class="link" href="udisks-std-options.html" title="The options parameter">standard options</a>).
95 </p></td>
96 </tr>
97 </tbody>
98 </table></div>
99 </div>
100 <hr>
101 <div class="refsect2">
102 <a name="gdbus-method-org-freedesktop-UDisks2-Filesystem.SetUUID"></a><h3>The SetUUID() method</h3>
103 <pre class="programlisting">
104 SetUUID (IN s uuid,
105 IN a{sv} options);
106 </pre>
107 <p>
108 Sets the filesystem UUID value.
109 </p>
110 <div class="variablelist"><table border="0" class="variablelist">
111 <colgroup>
112 <col align="left" valign="top">
113 <col>
114 </colgroup>
115 <tbody>
116 <tr>
117 <td><p><span class="term"><code class="literal">IN s <em class="parameter"><code>uuid</code></em></code>:</span></p></td>
118 <td><p>
119 The UUID to set.
120 </p></td>
121 </tr>
122 <tr>
123 <td><p><span class="term"><code class="literal">IN a{sv} <em class="parameter"><code>options</code></em></code>:</span></p></td>
124 <td><p>
125 Options (currently unused except for <a class="link" href="udisks-std-options.html" title="The options parameter">standard options</a>).
126 </p></td>
127 </tr>
128 </tbody>
129 </table></div>
130 <p class="since">Since 2.10.0</p>
131 </div>
132 <hr>
133 <div class="refsect2">
134 <a name="gdbus-method-org-freedesktop-UDisks2-Filesystem.Mount"></a><h3>The Mount() method</h3>
135 <pre class="programlisting">
136 Mount (IN a{sv} options,
137 OUT s mount_path);
138 </pre>
139 <p>
140 Mounts the filesystem.
141 </p>
142 <p>
143 The directory the filesystem will be mounted in is determined
144 by looking at data related to the device or filesystem (such
145 the filesystem UUID and label) and will be created
146 automatically except if the device the filesystem resides on
147 is referenced in the <code class="filename">/etc/fstab</code> file, see
148 below. In either case, the directory the filesystem is mounted
149 in, is returned in <em class="parameter"><code>mount_path</code></em> on success - it is usually a
150 sub-directory of <code class="filename">/run/media/$USER</code> but note that
151 any directory may be returned.
152 </p>
153 <p>
154 The filesystem type to use can be overridden with the <em class="parameter"><code>fstype</code></em>
155 option and mount options (a comma-separated string) can be
156 given in <em class="parameter"><code>options</code></em> option. Note that both the mount options and
157 filesystem types are validated against a (small) whitelist to
158 avoid unexpected privilege escalation. The filesystem type is
159 by default determined by the <a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-property-org-freedesktop-UDisks2-Block.IdType" title='The "IdType" property'>"IdType"</a>
160 property. The <em class="parameter"><code>fstype</code></em> option doesn't typically need to be
161 specified, primarily intended as an override in corner cases.
162 </p>
163 <p>
164 If the <em class="parameter"><code>as-user</code></em> option is set, the
165 filesystem is mounted on behalf of the specified user instead
166 of the calling one. This has usually an effect on the returned
167 <em class="parameter"><code>mount_path</code></em> and it also allows that user to unmount the
168 filesystem later. This option expects a user name, not a UID.
169 </p>
170 <p>
171 If the device in question is referenced in the
172 <code class="filename">/etc/fstab</code> file, the
173 <span class="command"><strong>mount</strong></span> command is called directly (as root)
174 and the given options or filesystem type given in <em class="parameter"><code>options</code></em> are
175 ignored.
176 </p>
177 <p>
178 If <code class="literal">x-udisks-auth</code> is specified as an option
179 for the device in the <code class="filename">/etc/fstab</code> file,
180 then the <span class="command"><strong>mount</strong></span> command is run as the
181 calling user, without performing any authorization check
182 mentioned above. If this fails because of insufficient
183 permissions, an authorization check is performed (which
184 typically results in the user having to authenticate as an
185 administrator). If authorized, the <span class="command"><strong>mount</strong></span>
186 command is then run as root.
187 </p>
188 <p>
189 The filesystem should be unmounted using the
190 <a class="link" href="gdbus-org.freedesktop.UDisks2.Filesystem.html#gdbus-method-org-freedesktop-UDisks2-Filesystem.Unmount" title="The Unmount() method">Unmount()</a> method.
191 </p>
192 <p>
193 If the device is removed without being unmounted (e.g. the
194 user yanking the device or pulling the media out) or unmounted
195 in a way that bypasses the
196 <a class="link" href="gdbus-org.freedesktop.UDisks2.Filesystem.html#gdbus-method-org-freedesktop-UDisks2-Filesystem.Unmount" title="The Unmount() method">Unmount()</a> method
197 (e.g. unmounted by the super-user by using the
198 <span class="citerefentry"><span class="refentrytitle">umount</span>(8)</span>
199 command directly), the device will be unmounted (if needed)
200 and/or the mount point will be cleaned up.
201 </p>
202 <div class="variablelist"><table border="0" class="variablelist">
203 <colgroup>
204 <col align="left" valign="top">
205 <col>
206 </colgroup>
207 <tbody>
208 <tr>
209 <td><p><span class="term"><code class="literal">IN a{sv} <em class="parameter"><code>options</code></em></code>:</span></p></td>
210 <td><p>
211 Options - known options (in addition to <a class="link" href="udisks-std-options.html" title="The options parameter">standard options</a>) includes <em class="parameter"><code>fstype</code></em> (of type 's'), <em class="parameter"><code>as-user</code></em> (of type 's') and <em class="parameter"><code>options</code></em> (of type 's').
212 </p></td>
213 </tr>
214 <tr>
215 <td><p><span class="term"><code class="literal">OUT s <em class="parameter"><code>mount_path</code></em></code>:</span></p></td>
216 <td><p>
217 The filesystem path where the device was mounted.
218 </p></td>
219 </tr>
220 </tbody>
221 </table></div>
222 </div>
223 <hr>
224 <div class="refsect2">
225 <a name="gdbus-method-org-freedesktop-UDisks2-Filesystem.Unmount"></a><h3>The Unmount() method</h3>
226 <pre class="programlisting">
227 Unmount (IN a{sv} options);
228 </pre>
229 <p>
230 Unmount a mounted device.
231 </p>
232 <p>
233 If the device in question was mounted by the calling user
234 via the <a class="link" href="gdbus-org.freedesktop.UDisks2.Filesystem.html#gdbus-method-org-freedesktop-UDisks2-Filesystem.Mount" title="The Mount() method">Mount()</a> method the
235 filesystem is unmounted without any authorization checks.
236 Otherwise, an authorization check is performed (which
237 typically results in the user having to authenticate as an
238 administrator). If authorized, the filesystem is unmounted.
239 </p>
240 <p>
241 If the mountpoint was previously created by udisks it is
242 guaranteed it will be removed upon returning from this method
243 call.
244 </p>
245 <p>
246 If the filesystem is busy, this operation fails with the error
247 <a class="link" href="udisks2-UDisksError.html#UDISKS-ERROR-DEVICE-BUSY:CAPS"><code class="constant">org.freedesktop.UDisks2.Error.DeviceBusy</code></a>
248 unless the <em class="parameter"><code>force</code></em> option is used.
249 </p>
250 <div class="variablelist"><table border="0" class="variablelist">
251 <colgroup>
252 <col align="left" valign="top">
253 <col>
254 </colgroup>
255 <tbody><tr>
256 <td><p><span class="term"><code class="literal">IN a{sv} <em class="parameter"><code>options</code></em></code>:</span></p></td>
257 <td><p>
258 Options - known options (in addition to <a class="link" href="udisks-std-options.html" title="The options parameter">standard options</a>) includes <em class="parameter"><code>force</code></em> (of type 'b').
259 </p></td>
260 </tr></tbody>
261 </table></div>
262 </div>
263 <hr>
264 <div class="refsect2">
265 <a name="gdbus-method-org-freedesktop-UDisks2-Filesystem.Resize"></a><h3>The Resize() method</h3>
266 <pre class="programlisting">
267 Resize (IN t size,
268 IN a{sv} options);
269 </pre>
270 <p>
271 Resizes the filesystem.
272 </p>
273 <p>
274 Shrinking operations need to move data which causes this action to be
275 slow. The filesystem-resize job for the object might expose progress.
276 </p>
277 <div class="variablelist"><table border="0" class="variablelist">
278 <colgroup>
279 <col align="left" valign="top">
280 <col>
281 </colgroup>
282 <tbody>
283 <tr>
284 <td><p><span class="term"><code class="literal">IN t <em class="parameter"><code>size</code></em></code>:</span></p></td>
285 <td><p>
286 The target size in bytes, 0 for maximum.
287 </p></td>
288 </tr>
289 <tr>
290 <td><p><span class="term"><code class="literal">IN a{sv} <em class="parameter"><code>options</code></em></code>:</span></p></td>
291 <td><p>
292 Options (currently unused except for <a class="link" href="udisks-std-options.html" title="The options parameter">standard options</a>).
293 </p></td>
294 </tr>
295 </tbody>
296 </table></div>
297 <p class="since">Since 2.7.2</p>
298 </div>
299 <hr>
300 <div class="refsect2">
301 <a name="gdbus-method-org-freedesktop-UDisks2-Filesystem.Check"></a><h3>The Check() method</h3>
302 <pre class="programlisting">
303 Check (IN a{sv} options,
304 OUT b consistent);
305 </pre>
306 <p>
307 </p>
308 <p>
309 <em class="parameter"><code>options</code></em>: Options (currently unused except for <a class="link" href="udisks-std-options.html" title="The options parameter">standard options</a>).
310 <em class="parameter"><code>consistent</code></em>: Whether the filesystem is undamaged.
311 <em class="parameter"><code>since</code></em>: 2.7.2
312 </p>
313 <p>
314 Checks the filesystem for consistency avoiding any modifications or repairs.
315 </p>
316 <p>
317 Mounted or unsupported filesystems will result in an error.
318 </p>
319 <div class="variablelist"><table border="0" class="variablelist">
320 <colgroup>
321 <col align="left" valign="top">
322 <col>
323 </colgroup>
324 <tbody>
325 <tr>
326 <td><p><span class="term"><code class="literal">IN a{sv} <em class="parameter"><code>options</code></em></code>:</span></p></td>
327 <td>
328 <p>
329 </p>
330 <p>
331 </p>
332 </td>
333 </tr>
334 <tr>
335 <td><p><span class="term"><code class="literal">OUT b <em class="parameter"><code>consistent</code></em></code>:</span></p></td>
336 <td>
337 <p>
338 </p>
339 <p>
340 </p>
341 </td>
342 </tr>
343 </tbody>
344 </table></div>
345 </div>
346 <hr>
347 <div class="refsect2">
348 <a name="gdbus-method-org-freedesktop-UDisks2-Filesystem.Repair"></a><h3>The Repair() method</h3>
349 <pre class="programlisting">
350 Repair (IN a{sv} options,
351 OUT b repaired);
352 </pre>
353 <p>
354 </p>
355 <p>
356 <em class="parameter"><code>options</code></em>: Options (currently unused except for <a class="link" href="udisks-std-options.html" title="The options parameter">standard options</a>).
357 <em class="parameter"><code>repaired</code></em>: Whether the filesystem could be successfully repaired.
358 <em class="parameter"><code>since</code></em>: 2.7.2
359 </p>
360 <p>
361 Tries to repair the filesystem.
362 </p>
363 <p>
364 Mounted or unsupported filesystems will result in an error.
365 </p>
366 <div class="variablelist"><table border="0" class="variablelist">
367 <colgroup>
368 <col align="left" valign="top">
369 <col>
370 </colgroup>
371 <tbody>
372 <tr>
373 <td><p><span class="term"><code class="literal">IN a{sv} <em class="parameter"><code>options</code></em></code>:</span></p></td>
374 <td>
375 <p>
376 </p>
377 <p>
378 </p>
379 </td>
380 </tr>
381 <tr>
382 <td><p><span class="term"><code class="literal">OUT b <em class="parameter"><code>repaired</code></em></code>:</span></p></td>
383 <td>
384 <p>
385 </p>
386 <p>
387 </p>
388 </td>
389 </tr>
390 </tbody>
391 </table></div>
392 </div>
393 <hr>
394 <div class="refsect2">
395 <a name="gdbus-method-org-freedesktop-UDisks2-Filesystem.TakeOwnership"></a><h3>The TakeOwnership() method</h3>
396 <pre class="programlisting">
397 TakeOwnership (IN a{sv} options);
398 </pre>
399 <p>
400 </p>
401 <p>
402 <em class="parameter"><code>options</code></em>: Options (in addition to <a class="link" href="udisks-std-options.html" title="The options parameter">standard options</a>) includes <em class="parameter"><code>recursive</code></em> (of type 'b').
403 <em class="parameter"><code>since</code></em>: 2.7.2
404 </p>
405 <p>
406 Changes ownership of the filesystem to the UID and GID of the calling
407 user.
408 </p>
409 <p>
410 Filesystems that don't support ownership result in an error.
411 </p>
412 <div class="variablelist"><table border="0" class="variablelist">
413 <colgroup>
414 <col align="left" valign="top">
415 <col>
416 </colgroup>
417 <tbody><tr>
418 <td><p><span class="term"><code class="literal">IN a{sv} <em class="parameter"><code>options</code></em></code>:</span></p></td>
419 <td>
420 <p>
421 </p>
422 <p>
423 </p>
424 </td>
425 </tr></tbody>
426 </table></div>
427 </div>
428 </div>
429 <div class="refsect1">
430 <a name="gdbus-properties-org.freedesktop.UDisks2.Filesystem"></a><h2>Property Details</h2>
431 <div class="refsect2">
432 <a name="gdbus-property-org-freedesktop-UDisks2-Filesystem.MountPoints"></a><h3>The "MountPoints" property</h3>
433 <pre class="programlisting">
434 MountPoints readable aay
435 </pre>
436 <p>
437 </p>
438 <p>
439 An array of filesystems paths for where the file system on
440 the device is mounted. If the device is not mounted, this
441 array is empty.
442 </p>
443 </div>
444 <hr>
445 <div class="refsect2">
446 <a name="gdbus-property-org-freedesktop-UDisks2-Filesystem.Size"></a><h3>The "Size" property</h3>
447 <pre class="programlisting">
448 Size readable t
449 </pre>
450 <p>
451 The size of the filesystem. This is the amount of
452 </p>
453 <p>
454 bytes used on the block device representing an outer filesystem
455 boundary. If this is smaller than org.freedesktop.Udisks2.Block.Size,
456 then the filesystem can be made larger with Resize.
457 </p>
458 <p>
459 If the size is unknown, the property is zero. Currently limited
460 to xfs and ext filesystems only.
461 </p>
462 <p>
463 Please note that reading value of this property typically causes
464 some I/O to read the filesystem superblock. Unlike the rest
465 of the properties this one is set to be retrieved on-demand
466 and is not proactively cached by the daemon.
467 </p>
468 </div>
469 </div>
470 </div>
471 <div class="footer">
472 <hr>Generated by GTK-Doc V1.35.1</div>
473 </body>
474 </html>