/core/sdk-objc/Documentation/GMUserFileSystem/Classes/GMUserFileSystem_/Methods/Methods.html

http://macfuse.googlecode.com/ · HTML · 175 lines · 173 code · 2 blank · 0 comment · 0 complexity · 35ed4dd3a85ab76c6372a81a2ae15a96 MD5 · raw file

  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/1998/REC-html40-19980424/loose.dtd">
  2. <html>
  3. <head>
  4. <title>Methods</title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  6. <meta name="generator" content="HeaderDoc">
  7. <style type="text/css"><!--.keyword {background:#ffffff; color:#761550;}.template {background:#ffffff; color:#761550;}.number {background: #ffffff; color:#0000ff;}.function {background:#ffffff; color:#000000;}.string {background: #ffffff; color:#891315;}.preprocessor {background:#ffffff; color:#236e25}.comment {background:#ffffff; color:#236e25}.char {background: #ffffff; color:#0000ff;}.var {background:#ffffff; color:#000000;}.type {background:#ffffff; color:#761550;}.param {background:#ffffff; color:#000000;}a:link {text-decoration: none; font-family: lucida grande, geneva, helvetica, arial, sans-serif; font-size: small; color: #0000ff;}a:visited {text-decoration: none; font-family: lucida grande, geneva, helvetica, arial, sans-serif; font-size: small; color: #0000ff;}a:visited:hover {text-decoration: underline; font-family: lucida grande, geneva, helvetica, arial, sans-serif; font-size: small; color: #ff6600;}a:active {text-decoration: none; font-family: lucida grande, geneva, helvetica, arial, sans-serif; font-size: small; color: #ff6600;}a:hover {text-decoration: underline; font-family: lucida grande, geneva, helvetica, arial, sans-serif; font-size: small; color: #ff6600;}h4 {text-decoration: none; font-family: lucida grande, geneva, helvetica, arial, sans-serif; font-size: tiny; font-weight: bold;}body {text-decoration: none; font-family: lucida grande, geneva, helvetica, arial, sans-serif; font-size: 10pt;}--></style>
  8. </head>
  9. <body bgcolor="#ffffff">
  10. <a name="top"></a><a name="HeaderDoc_methods"></a><dl>
  11. <dt><tt><a href="Methods.html#//apple_ref/occ/instm/GMUserFileSystem/initWithDelegate:isThreadSafe:" target="doc">-initWithDelegate:isThreadSafe: </a></tt></dt>
  12. <dd>Initialize the user space file system.
  13. </dd>
  14. <dt><tt><a href="Methods.html#//apple_ref/occ/instm/GMUserFileSystem/setDelegate:" target="doc">-setDelegate:</a></tt></dt>
  15. <dd>Set the file system delegate.
  16. </dd>
  17. <dt><tt><a href="Methods.html#//apple_ref/occ/instm/GMUserFileSystem/delegate" target="doc">-delegate</a></tt></dt>
  18. <dd>Get the file system delegate.
  19. </dd>
  20. <dt><tt><a href="Methods.html#//apple_ref/occ/instm/GMUserFileSystem/mountAtPath:withOptions:" target="doc">-mountAtPath:withOptions: </a></tt></dt>
  21. <dd>Mount the file system at the given path.
  22. </dd>
  23. <dt><tt><a href="Methods.html#//apple_ref/occ/instm/GMUserFileSystem/mountAtPath:withOptions:shouldForeground:detachNewThread:" target="doc">-mountAtPath:withOptions:shouldForeground:detachNewThread: </a></tt></dt>
  24. <dd>Mount the file system at the given path with advanced options.
  25. </dd>
  26. <dt><tt><a href="Methods.html#//apple_ref/occ/instm/GMUserFileSystem/unmount" target="doc">-unmount </a></tt></dt>
  27. <dd>Unmount the file system.
  28. </dd>
  29. </dl>
  30. <hr>
  31. <!-- headerDoc=instm; uid=//apple_ref/occ/instm/GMUserFileSystem/initWithDelegate:isThreadSafe:; name=GMUserFileSystem::initWithDelegate:isThreadSafe: --><a name="//apple_ref/occ/instm/GMUserFileSystem/initWithDelegate:isThreadSafe:"></a><table border="0" cellpadding="2" cellspacing="2" width="300"><tr><td valign="top" height="12" colspan="5">
  32. <h3><a name="initWithDelegate:isThreadSafe:">initWithDelegate:isThreadSafe: </a></h3>
  33. </td></tr></table>
  34. <hr>
  35. <p><!-- begin abstract -->Initialize the user space file system.
  36. <!-- end abstract --></p>
  37. <p></p>
  38. <pre>- (<!-- a logicalPath="//apple_ref/occ/cl/id //apple_ref/occ/tdef/id //apple_ref/occ/tag/id //apple_ref/occ/econst/id //apple_ref/occ/struct/id //apple_ref/occ/clconst/id //apple_ref/occ/intf/id" --><span class="type">id</span><!-- /a -->)<!-- a logicalPath="//apple_ref/occ/instm/initWithDelegate //apple_ref/occ/clm/initWithDelegate //apple_ref/occ/intfcm/initWithDelegate //apple_ref/occ/intfm/initWithDelegate //apple_ref/occ/func/initWithDelegate //apple_ref/occ/ftmplt/initWithDelegate //apple_ref/occ/defn/initWithDelegate //apple_ref/occ/macro/initWithDelegate" --><span class="function">initWithDelegate</span><!-- /a -->:(<!-- a logicalPath="//apple_ref/occ/cl/id //apple_ref/occ/tdef/id //apple_ref/occ/tag/id //apple_ref/occ/econst/id //apple_ref/occ/struct/id //apple_ref/occ/clconst/id //apple_ref/occ/intf/id" --><span class="type">id</span><!-- /a -->)<span class="param">delegate</span> <!-- a logicalPath="//apple_ref/occ/instm/isThreadSafe //apple_ref/occ/clm/isThreadSafe //apple_ref/occ/intfcm/isThreadSafe //apple_ref/occ/intfm/isThreadSafe //apple_ref/occ/func/isThreadSafe //apple_ref/occ/ftmplt/isThreadSafe //apple_ref/occ/defn/isThreadSafe //apple_ref/occ/macro/isThreadSafe" --><span class="function">isThreadSafe</span><!-- /a -->:(<!-- a logicalPath="//apple_ref/occ/cl/BOOL //apple_ref/occ/tdef/BOOL //apple_ref/occ/tag/BOOL //apple_ref/occ/econst/BOOL //apple_ref/occ/struct/BOOL //apple_ref/occ/clconst/BOOL //apple_ref/occ/intf/BOOL" --><span class="type">BOOL</span><!-- /a -->)<span class="var">isThreadSafe</span>; </pre>
  39. <h5 class="tight"><font face="Lucida Grande,Helvetica,Arial">Parameters</font></h5>
  40. <dl>
  41. <dt><code>delegate </code></dt>
  42. <dd>The file system delegate; implements the file system logic.</dd>
  43. <dt><code>isThreadSafe </code></dt>
  44. <dd>Is the file system delegate thread safe?</dd>
  45. </dl>
  46. <h5 class="tight"><font face="Lucida Grande,Helvetica,Arial">Return Value</font></h5>
  47. <p><!-- begin return value -->A GMUserFileSystem instance.
  48. <!-- end return value --></p>
  49. <h5 class="tight">
  50. <font face="Lucida Grande,Helvetica,Arial">Discussion</font>
  51. </h5>
  52. <p><!-- begin discussion -->The file system delegate should implement some or all of the
  53. GMUserFileSystemOperations informal protocol. You should only specify YES
  54. for isThreadSafe if your file system delegate is thread safe with respect to
  55. file system operations. That implies that it implements proper file system
  56. locking so that multiple operations on the same file can be done safely.
  57. <!-- end discussion --></p>
  58. <p></p>
  59. <hr>
  60. <!-- headerDoc=instm; uid=//apple_ref/occ/instm/GMUserFileSystem/setDelegate:; name=GMUserFileSystem::setDelegate: --><a name="//apple_ref/occ/instm/GMUserFileSystem/setDelegate:"></a><table border="0" cellpadding="2" cellspacing="2" width="300"><tr><td valign="top" height="12" colspan="5">
  61. <h3><a name="setDelegate:">setDelegate:</a></h3>
  62. </td></tr></table>
  63. <hr>
  64. <p><!-- begin abstract -->Set the file system delegate.
  65. <!-- end abstract --></p>
  66. <p></p>
  67. <pre>- (<!-- a logicalPath="//apple_ref/occ/cl/void //apple_ref/occ/tdef/void //apple_ref/occ/tag/void //apple_ref/occ/econst/void //apple_ref/occ/struct/void //apple_ref/occ/clconst/void //apple_ref/occ/intf/void" --><span class="type">void</span><!-- /a -->)<!-- a logicalPath="//apple_ref/occ/instm/setDelegate //apple_ref/occ/clm/setDelegate //apple_ref/occ/intfcm/setDelegate //apple_ref/occ/intfm/setDelegate //apple_ref/occ/func/setDelegate //apple_ref/occ/ftmplt/setDelegate //apple_ref/occ/defn/setDelegate //apple_ref/occ/macro/setDelegate" --><span class="function">setDelegate</span><!-- /a -->:(<!-- a logicalPath="//apple_ref/occ/cl/id //apple_ref/occ/tdef/id //apple_ref/occ/tag/id //apple_ref/occ/econst/id //apple_ref/occ/struct/id //apple_ref/occ/clconst/id //apple_ref/occ/intf/id" --><span class="type">id</span><!-- /a -->)<span class="var">delegate</span>; </pre>
  68. <h5 class="tight"><font face="Lucida Grande,Helvetica,Arial">Parameters</font></h5>
  69. <dl>
  70. <dt><code>delegate </code></dt>
  71. <dd>The delegate to use from now on for this file system.</dd>
  72. </dl>
  73. <p></p>
  74. <hr>
  75. <!-- headerDoc=instm; uid=//apple_ref/occ/instm/GMUserFileSystem/delegate; name=GMUserFileSystem::delegate --><a name="//apple_ref/occ/instm/GMUserFileSystem/delegate"></a><table border="0" cellpadding="2" cellspacing="2" width="300"><tr><td valign="top" height="12" colspan="5">
  76. <h3><a name="delegate">delegate</a></h3>
  77. </td></tr></table>
  78. <hr>
  79. <p><!-- begin abstract -->Get the file system delegate.
  80. <!-- end abstract --></p>
  81. <p></p>
  82. <pre>- (<!-- a logicalPath="//apple_ref/occ/cl/id //apple_ref/occ/tdef/id //apple_ref/occ/tag/id //apple_ref/occ/econst/id //apple_ref/occ/struct/id //apple_ref/occ/clconst/id //apple_ref/occ/intf/id" --><span class="type">id</span><!-- /a -->)<span class="var">delegate</span>; </pre>
  83. <h5 class="tight"><font face="Lucida Grande,Helvetica,Arial">Return Value</font></h5>
  84. <p><!-- begin return value -->The file system delegate.
  85. <!-- end return value --></p>
  86. <p></p>
  87. <hr>
  88. <!-- headerDoc=instm; uid=//apple_ref/occ/instm/GMUserFileSystem/mountAtPath:withOptions:; name=GMUserFileSystem::mountAtPath:withOptions: --><a name="//apple_ref/occ/instm/GMUserFileSystem/mountAtPath:withOptions:"></a><table border="0" cellpadding="2" cellspacing="2" width="300"><tr><td valign="top" height="12" colspan="5">
  89. <h3><a name="mountAtPath:withOptions:">mountAtPath:withOptions: </a></h3>
  90. </td></tr></table>
  91. <hr>
  92. <p><!-- begin abstract -->Mount the file system at the given path.
  93. <!-- end abstract --></p>
  94. <p></p>
  95. <pre>- (<!-- a logicalPath="//apple_ref/occ/cl/void //apple_ref/occ/tdef/void //apple_ref/occ/tag/void //apple_ref/occ/econst/void //apple_ref/occ/struct/void //apple_ref/occ/clconst/void //apple_ref/occ/intf/void" --><span class="type">void</span><!-- /a -->)<!-- a logicalPath="//apple_ref/occ/instm/mountAtPath //apple_ref/occ/clm/mountAtPath //apple_ref/occ/intfcm/mountAtPath //apple_ref/occ/intfm/mountAtPath //apple_ref/occ/func/mountAtPath //apple_ref/occ/ftmplt/mountAtPath //apple_ref/occ/defn/mountAtPath //apple_ref/occ/macro/mountAtPath" --><span class="function">mountAtPath</span><!-- /a -->:(<!-- a logicalPath="//apple_ref/occ/cl/NSString //apple_ref/occ/tdef/NSString //apple_ref/occ/tag/NSString //apple_ref/occ/econst/NSString //apple_ref/occ/struct/NSString //apple_ref/occ/clconst/NSString //apple_ref/occ/intf/NSString" --><span class="type">NSString</span><!-- /a --> <span class="type">*</span>)<span class="param">mountPath</span> <!-- a logicalPath="//apple_ref/occ/instm/withOptions //apple_ref/occ/clm/withOptions //apple_ref/occ/intfcm/withOptions //apple_ref/occ/intfm/withOptions //apple_ref/occ/func/withOptions //apple_ref/occ/ftmplt/withOptions //apple_ref/occ/defn/withOptions //apple_ref/occ/macro/withOptions" --><span class="function">withOptions</span><!-- /a -->:(<!-- a logicalPath="//apple_ref/occ/cl/NSArray //apple_ref/occ/tdef/NSArray //apple_ref/occ/tag/NSArray //apple_ref/occ/econst/NSArray //apple_ref/occ/struct/NSArray //apple_ref/occ/clconst/NSArray //apple_ref/occ/intf/NSArray" --><span class="type">NSArray</span><!-- /a --> <span class="type">*</span>)<span class="var">options</span>; </pre>
  96. <h5 class="tight"><font face="Lucida Grande,Helvetica,Arial">Parameters</font></h5>
  97. <dl>
  98. <dt><code>mountPath </code></dt>
  99. <dd>The path to mount on, e.g. /Volumes/MyFileSystem</dd>
  100. <dt><code>options </code></dt>
  101. <dd>The set of mount time options to use.</dd>
  102. </dl>
  103. <h5 class="tight">
  104. <font face="Lucida Grande,Helvetica,Arial">Discussion</font>
  105. </h5>
  106. <p><!-- begin discussion -->Mounts the file system at mountPath with the given set of options.
  107. The set of available options can be found on the
  108. <a href="http://code.google.com/p/macfuse/wiki/OPTIONS" target="_top">options</a> wiki page.
  109. For example, to turn on debug output add @"debug" to the options NSArray.
  110. If the mount succeeds, then a kGMUserFileSystemDidMount notification is posted
  111. to the default noification center. If the mount fails, then a
  112. kGMUserFileSystemMountFailed notification will be posted instead.
  113. <!-- end discussion --></p>
  114. <p></p>
  115. <hr>
  116. <!-- headerDoc=instm; uid=//apple_ref/occ/instm/GMUserFileSystem/mountAtPath:withOptions:shouldForeground:detachNewThread:; name=GMUserFileSystem::mountAtPath:withOptions:shouldForeground:detachNewThread: --><a name="//apple_ref/occ/instm/GMUserFileSystem/mountAtPath:withOptions:shouldForeground:detachNewThread:"></a><table border="0" cellpadding="2" cellspacing="2" width="300"><tr><td valign="top" height="12" colspan="5">
  117. <h3><a name="mountAtPath:withOptions:shouldForeground:detachNewThread:">mountAtPath:withOptions:shouldForeground:detachNewThread: </a></h3>
  118. </td></tr></table>
  119. <hr>
  120. <p><!-- begin abstract -->Mount the file system at the given path with advanced options.
  121. <!-- end abstract --></p>
  122. <p></p>
  123. <pre>- (<!-- a logicalPath="//apple_ref/occ/cl/void //apple_ref/occ/tdef/void //apple_ref/occ/tag/void //apple_ref/occ/econst/void //apple_ref/occ/struct/void //apple_ref/occ/clconst/void //apple_ref/occ/intf/void" --><span class="type">void</span><!-- /a -->)<!-- a logicalPath="//apple_ref/occ/instm/mountAtPath //apple_ref/occ/clm/mountAtPath //apple_ref/occ/intfcm/mountAtPath //apple_ref/occ/intfm/mountAtPath //apple_ref/occ/func/mountAtPath //apple_ref/occ/ftmplt/mountAtPath //apple_ref/occ/defn/mountAtPath //apple_ref/occ/macro/mountAtPath" --><span class="function">mountAtPath</span><!-- /a -->:(<!-- a logicalPath="//apple_ref/occ/cl/NSString //apple_ref/occ/tdef/NSString //apple_ref/occ/tag/NSString //apple_ref/occ/econst/NSString //apple_ref/occ/struct/NSString //apple_ref/occ/clconst/NSString //apple_ref/occ/intf/NSString" --><span class="type">NSString</span><!-- /a --> <span class="type">*</span>)<span class="param">mountPath</span> <!-- a logicalPath="//apple_ref/occ/instm/withOptions //apple_ref/occ/clm/withOptions //apple_ref/occ/intfcm/withOptions //apple_ref/occ/intfm/withOptions //apple_ref/occ/func/withOptions //apple_ref/occ/ftmplt/withOptions //apple_ref/occ/defn/withOptions //apple_ref/occ/macro/withOptions" --><span class="function">withOptions</span><!-- /a -->:(<!-- a logicalPath="//apple_ref/occ/cl/NSArray //apple_ref/occ/tdef/NSArray //apple_ref/occ/tag/NSArray //apple_ref/occ/econst/NSArray //apple_ref/occ/struct/NSArray //apple_ref/occ/clconst/NSArray //apple_ref/occ/intf/NSArray" --><span class="type">NSArray</span><!-- /a --> <span class="type">*</span>)<span class="param">options</span> <!-- a logicalPath="//apple_ref/occ/instm/shouldForeground //apple_ref/occ/clm/shouldForeground //apple_ref/occ/intfcm/shouldForeground //apple_ref/occ/intfm/shouldForeground //apple_ref/occ/func/shouldForeground //apple_ref/occ/ftmplt/shouldForeground //apple_ref/occ/defn/shouldForeground //apple_ref/occ/macro/shouldForeground" --><span class="function">shouldForeground</span><!-- /a -->:(<!-- a logicalPath="//apple_ref/occ/cl/BOOL //apple_ref/occ/tdef/BOOL //apple_ref/occ/tag/BOOL //apple_ref/occ/econst/BOOL //apple_ref/occ/struct/BOOL //apple_ref/occ/clconst/BOOL //apple_ref/occ/intf/BOOL" --><span class="type">BOOL</span><!-- /a -->)<span class="param">shouldForeground</span> <span class="comment">// Recommend: YES</span> <!-- a logicalPath="//apple_ref/occ/instm/detachNewThread //apple_ref/occ/clm/detachNewThread //apple_ref/occ/intfcm/detachNewThread //apple_ref/occ/intfm/detachNewThread //apple_ref/occ/func/detachNewThread //apple_ref/occ/ftmplt/detachNewThread //apple_ref/occ/defn/detachNewThread //apple_ref/occ/macro/detachNewThread" --><span class="function">detachNewThread</span><!-- /a -->:(<!-- a logicalPath="//apple_ref/occ/cl/BOOL //apple_ref/occ/tdef/BOOL //apple_ref/occ/tag/BOOL //apple_ref/occ/econst/BOOL //apple_ref/occ/struct/BOOL //apple_ref/occ/clconst/BOOL //apple_ref/occ/intf/BOOL" --><span class="type">BOOL</span><!-- /a -->)<span class="var">detachNewThread</span>; </pre>
  124. <h5 class="tight"><font face="Lucida Grande,Helvetica,Arial">Parameters</font></h5>
  125. <dl>
  126. <dt><code>mountPath </code></dt>
  127. <dd>The path to mount on, e.g. /Volumes/MyFileSystem</dd>
  128. <dt><code>options </code></dt>
  129. <dd>The set of mount time options to use.</dd>
  130. <dt><code>shouldForeground </code></dt>
  131. <dd>Should the file system thread remain foreground rather
  132. than daemonize? (Recommend: YES)</dd>
  133. <dt><code>detachNewThread </code></dt>
  134. <dd>Should the file system run in a new thread rather than
  135. the current one? (Recommend: YES)</dd>
  136. </dl>
  137. <h5 class="tight">
  138. <font face="Lucida Grande,Helvetica,Arial">Discussion</font>
  139. </h5>
  140. <p><!-- begin discussion -->Mounts the file system at mountPath with the given set of options.
  141. This is an advanced version of <a href="../../../../../Documentation/GMUserFileSystem/Classes/GMUserFileSystem_/index.html?Methods/Methods.html#//apple_ref/occ/instm/GMUserFileSystem/mountAtPath:withOptions:" logicalPath="//apple_ref/occ/instm/GMUserFileSystem/mountAtPath:withOptions:" target="_top">mountAtPath:withOptions </a>
  142. You can use this to mount from a command-line program as follows:</p>
  143. <ul>
  144. <li>For an app, use: shouldForeground=YES, detachNewThread=YES
  145. </li>
  146. <li>For a daemon: shouldForeground=NO, detachNewThread=NO
  147. </li>
  148. <li>For debug output: shouldForeground=YES, detachNewThread=NO
  149. </li>
  150. <li>For a daemon+runloop: shouldForeground=NO, detachNewThread=YES<br>
  151. - NOTE: I've never tried daemon+runloop; maybe it doesn't make sense</li>
  152. </ul>
  153. <!-- end discussion --><p></p>
  154. <hr>
  155. <!-- headerDoc=instm; uid=//apple_ref/occ/instm/GMUserFileSystem/unmount; name=GMUserFileSystem::unmount --><a name="//apple_ref/occ/instm/GMUserFileSystem/unmount"></a><table border="0" cellpadding="2" cellspacing="2" width="300"><tr><td valign="top" height="12" colspan="5">
  156. <h3><a name="unmount">unmount </a></h3>
  157. </td></tr></table>
  158. <hr>
  159. <p><!-- begin abstract -->Unmount the file system.
  160. <!-- end abstract --></p>
  161. <p></p>
  162. <pre>- (<!-- a logicalPath="//apple_ref/occ/cl/void //apple_ref/occ/tdef/void //apple_ref/occ/tag/void //apple_ref/occ/econst/void //apple_ref/occ/struct/void //apple_ref/occ/clconst/void //apple_ref/occ/intf/void" --><span class="type">void</span><!-- /a -->)<span class="var">unmount</span>; </pre>
  163. <h5 class="tight">
  164. <font face="Lucida Grande,Helvetica,Arial">Discussion</font>
  165. </h5>
  166. <p><!-- begin discussion -->Unmounts the file system. The kGMUserFileSystemDidUnmount
  167. notification will be posted.
  168. <!-- end discussion --></p>
  169. <p></p>
  170. <p>Last Updated: Monday, November 17, 2008
  171. </p>
  172. </body>
  173. </html>