/usr/share/doc/libucommon-dev/a00193_source.html is in libucommon-doc 3.2.0-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>UCommon: ucommon/fsys.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.3 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="main.html"><span>Main Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Data Structures</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
<li><a href="examples.html"><span>Examples</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="files.html"><span>File List</span></a></li>
<li><a href="globals.html"><span>Globals</span></a></li>
</ul>
</div>
<h1>ucommon/fsys.h</h1><a href="a00193.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.</span>
<a name="l00002"></a>00002 <span class="comment">//</span>
<a name="l00003"></a>00003 <span class="comment">// This file is part of GNU uCommon C++.</span>
<a name="l00004"></a>00004 <span class="comment">//</span>
<a name="l00005"></a>00005 <span class="comment">// GNU uCommon C++ is free software: you can redistribute it and/or modify</span>
<a name="l00006"></a>00006 <span class="comment">// it under the terms of the GNU Lesser General Public License as published </span>
<a name="l00007"></a>00007 <span class="comment">// by the Free Software Foundation, either version 3 of the License, or</span>
<a name="l00008"></a>00008 <span class="comment">// (at your option) any later version.</span>
<a name="l00009"></a>00009 <span class="comment">//</span>
<a name="l00010"></a>00010 <span class="comment">// GNU uCommon C++ is distributed in the hope that it will be useful,</span>
<a name="l00011"></a>00011 <span class="comment">// but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00012"></a>00012 <span class="comment">// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span>
<a name="l00013"></a>00013 <span class="comment">// GNU Lesser General Public License for more details.</span>
<a name="l00014"></a>00014 <span class="comment">//</span>
<a name="l00015"></a>00015 <span class="comment">// You should have received a copy of the GNU Lesser General Public License</span>
<a name="l00016"></a>00016 <span class="comment">// along with GNU uCommon C++. If not, see <http://www.gnu.org/licenses/>.</span>
<a name="l00017"></a>00017
<a name="l00027"></a>00027 <span class="preprocessor">#ifndef _UCOMMON_FILE_H_</span>
<a name="l00028"></a>00028 <span class="preprocessor"></span><span class="preprocessor">#define _UCOMMON_FILE_H_</span>
<a name="l00029"></a>00029 <span class="preprocessor"></span>
<a name="l00030"></a>00030 <span class="preprocessor">#ifndef _UCOMMON_CONFIG_H_</span>
<a name="l00031"></a>00031 <span class="preprocessor"></span><span class="preprocessor">#include <<a class="code" href="a00201.html" title="Various miscelanous platform specific headers and defines.">ucommon/platform.h</a>></span>
<a name="l00032"></a>00032 <span class="preprocessor">#endif</span>
<a name="l00033"></a>00033 <span class="preprocessor"></span>
<a name="l00034"></a>00034 <span class="preprocessor">#ifndef _UCOMMON_THREAD_H_</span>
<a name="l00035"></a>00035 <span class="preprocessor"></span><span class="preprocessor">#include <<a class="code" href="a00208.html" title="Thread classes and sychronization objects.">ucommon/thread.h</a>></span>
<a name="l00036"></a>00036 <span class="preprocessor">#endif</span>
<a name="l00037"></a>00037 <span class="preprocessor"></span>
<a name="l00038"></a>00038 <span class="preprocessor">#ifndef _MSWINDOWS_</span>
<a name="l00039"></a>00039 <span class="preprocessor"></span><span class="preprocessor">#include <sys/stat.h></span>
<a name="l00040"></a>00040 <span class="preprocessor">#endif</span>
<a name="l00041"></a>00041 <span class="preprocessor"></span>
<a name="l00042"></a>00042 <span class="preprocessor">#include <errno.h></span>
<a name="l00043"></a>00043 <span class="preprocessor">#include <stdio.h></span>
<a name="l00044"></a>00044
<a name="l00045"></a>00045 NAMESPACE_UCOMMON
<a name="l00046"></a>00046
<a name="l00050"></a><a class="code" href="a00214.html#aa8b751386d4efc392a172a54129d0d64">00050</a> <span class="keyword">typedef</span> <span class="keywordtype">void</span> *<a class="code" href="a00214.html#aa8b751386d4efc392a172a54129d0d64" title="Convenience type for directory scan operations.">dir_t</a>;
<a name="l00051"></a>00051
<a name="l00055"></a><a class="code" href="a00214.html#aa9cb60aa4a9882fdf643686da8ce8a95">00055</a> <span class="keyword">typedef</span> <span class="keywordtype">void</span> *<a class="code" href="a00214.html#aa9cb60aa4a9882fdf643686da8ce8a95" title="Convenience type for loader operations.">mem_t</a>;
<a name="l00056"></a>00056
<a name="l00065"></a><a class="code" href="a00056.html">00065</a> <span class="keyword">class </span>__EXPORT <a class="code" href="a00056.html" title="A container for generic and o/s portable threadsafe file system functions.">fsys</a>
<a name="l00066"></a>00066 {
<a name="l00067"></a>00067 <span class="keyword">protected</span>:
<a name="l00068"></a>00068 fd_t fd;
<a name="l00069"></a>00069 <span class="preprocessor">#ifdef _MSWINDOWS_</span>
<a name="l00070"></a>00070 <span class="preprocessor"></span> WIN32_FIND_DATA *ptr;
<a name="l00071"></a>00071 HINSTANCE mem;
<a name="l00072"></a>00072 <span class="preprocessor">#else</span>
<a name="l00073"></a>00073 <span class="preprocessor"></span> <span class="keywordtype">void</span> *ptr;
<a name="l00074"></a>00074 <span class="preprocessor">#endif</span>
<a name="l00075"></a>00075 <span class="preprocessor"></span> <span class="keywordtype">int</span> error;
<a name="l00076"></a>00076
<a name="l00077"></a>00077 <span class="keyword">public</span>:
<a name="l00078"></a>00078 <span class="preprocessor">#ifdef _MSWINDOWS_</span>
<a name="l00079"></a>00079 <span class="preprocessor"></span> <span class="keyword">static</span> <span class="keywordtype">int</span> remapError(<span class="keywordtype">void</span>);
<a name="l00080"></a>00080 <span class="preprocessor">#else</span>
<a name="l00081"></a>00081 <span class="preprocessor"></span> <span class="keyword">inline</span> <span class="keyword">static</span> <span class="keywordtype">int</span> remapError(<span class="keywordtype">void</span>)
<a name="l00082"></a>00082 {<span class="keywordflow">return</span> errno;};
<a name="l00083"></a>00083 <span class="preprocessor">#endif</span>
<a name="l00084"></a>00084 <span class="preprocessor"></span>
<a name="l00088"></a><a class="code" href="a00056.html#a5e886a4f005b2a2948d2a3fb4e9f0deb">00088</a> <span class="keyword">typedef</span> <span class="keyword">enum</span> {
<a name="l00089"></a>00089 ACCESS_RDONLY,
<a name="l00090"></a>00090 ACCESS_WRONLY,
<a name="l00091"></a>00091 ACCESS_REWRITE,
<a name="l00092"></a>00092 ACCESS_RDWR = ACCESS_REWRITE,
<a name="l00093"></a>00093 ACCESS_APPEND,
<a name="l00094"></a>00094 ACCESS_SHARED,
<a name="l00095"></a>00095 ACCESS_DIRECTORY,
<a name="l00096"></a>00096 ACCESS_STREAM,
<a name="l00097"></a>00097 ACCESS_RANDOM
<a name="l00098"></a>00098 } access_t;
<a name="l00099"></a>00099
<a name="l00103"></a><a class="code" href="a00056.html#acd8d82ddbf77b2c44371f3bf19746f60">00103</a> <span class="keyword">typedef</span> <span class="keywordtype">long</span> <a class="code" href="a00056.html#acd8d82ddbf77b2c44371f3bf19746f60" title="File offset type.">offset_t</a>;
<a name="l00104"></a>00104
<a name="l00108"></a><a class="code" href="a00056.html#a28f8173c93b36e1466144e5158fce7e1">00108</a> <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="a00056.html#acd8d82ddbf77b2c44371f3bf19746f60" title="File offset type.">offset_t</a> end;
<a name="l00109"></a>00109
<a name="l00113"></a>00113 <a class="code" href="a00056.html" title="A container for generic and o/s portable threadsafe file system functions.">fsys</a>();
<a name="l00114"></a>00114
<a name="l00119"></a>00119 <a class="code" href="a00056.html" title="A container for generic and o/s portable threadsafe file system functions.">fsys</a>(<span class="keyword">const</span> <a class="code" href="a00056.html" title="A container for generic and o/s portable threadsafe file system functions.">fsys</a>& descriptor);
<a name="l00120"></a>00120
<a name="l00126"></a>00126 <a class="code" href="a00056.html" title="A container for generic and o/s portable threadsafe file system functions.">fsys</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *path, <a class="code" href="a00056.html#a5e886a4f005b2a2948d2a3fb4e9f0deb" title="Enumerated file access modes.">access_t</a> <a class="code" href="a00214.html#ad6378c2aa4e17197d8e936674e5b2687" title="Convenience function to access (lock) shared object through it&#39;s protocol.">access</a>);
<a name="l00127"></a>00127
<a name="l00134"></a>00134 <a class="code" href="a00056.html" title="A container for generic and o/s portable threadsafe file system functions.">fsys</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *path, <a class="code" href="a00056.html#a5e886a4f005b2a2948d2a3fb4e9f0deb" title="Enumerated file access modes.">access_t</a> <a class="code" href="a00214.html#ad6378c2aa4e17197d8e936674e5b2687" title="Convenience function to access (lock) shared object through it&#39;s protocol.">access</a>, <span class="keywordtype">unsigned</span> permission);
<a name="l00135"></a>00135
<a name="l00139"></a>00139 ~<a class="code" href="a00056.html" title="A container for generic and o/s portable threadsafe file system functions.">fsys</a>();
<a name="l00140"></a>00140
<a name="l00145"></a><a class="code" href="a00056.html#aa71fdb6b216f218b1f6a48eba5637955">00145</a> <span class="keyword">inline</span> fd_t operator*()<span class="keyword"> const</span>
<a name="l00146"></a>00146 <span class="keyword"> </span>{<span class="keywordflow">return</span> fd;};
<a name="l00147"></a>00147
<a name="l00152"></a><a class="code" href="a00056.html#a4f1b3127e21cca539ddd19db78d151b7">00152</a> <span class="keyword">inline</span> operator fd_t()<span class="keyword"> const</span>
<a name="l00153"></a>00153 <span class="keyword"> </span>{<span class="keywordflow">return</span> fd;};
<a name="l00154"></a>00154
<a name="l00159"></a><a class="code" href="a00056.html#aa18180ec5be0b8c573fe897c57f7601a">00159</a> <span class="keyword">inline</span> operator bool()<span class="keyword"> const</span>
<a name="l00160"></a>00160 <span class="keyword"> </span>{<span class="keywordflow">return</span> fd != INVALID_HANDLE_VALUE || ptr != NULL;};
<a name="l00161"></a>00161
<a name="l00166"></a><a class="code" href="a00056.html#ac21813f8b19316b81790a96fc6fb2b64">00166</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator!()<span class="keyword"> const</span>
<a name="l00167"></a>00167 <span class="keyword"> </span>{<span class="keywordflow">return</span> fd == INVALID_HANDLE_VALUE && ptr == NULL;};
<a name="l00168"></a>00168
<a name="l00173"></a>00173 <span class="keywordtype">void</span> operator=(<span class="keyword">const</span> <a class="code" href="a00056.html" title="A container for generic and o/s portable threadsafe file system functions.">fsys</a>& descriptor);
<a name="l00174"></a>00174
<a name="l00179"></a>00179 <span class="keywordtype">void</span> operator=(fd_t descriptor);
<a name="l00180"></a>00180
<a name="l00186"></a><a class="code" href="a00056.html#a6a577edba6724284f284d12ecb26eb0b">00186</a> <span class="keyword">inline</span> <span class="keywordtype">int</span> getError(<span class="keywordtype">void</span>)<span class="keyword"> const</span>
<a name="l00187"></a>00187 <span class="keyword"> </span>{<span class="keywordflow">return</span> error;};
<a name="l00188"></a>00188
<a name="l00193"></a><a class="code" href="a00056.html#ab98973c094342fb69f72a670d2e254e1">00193</a> <span class="keyword">inline</span> fd_t getHandle(<span class="keywordtype">void</span>)<span class="keyword"> const</span>
<a name="l00194"></a>00194 <span class="keyword"> </span>{<span class="keywordflow">return</span> fd;};
<a name="l00195"></a>00195
<a name="l00201"></a>00201 <span class="keywordtype">int</span> seek(offset_t offset);
<a name="l00202"></a>00202
<a name="l00208"></a>00208 <span class="keywordtype">int</span> drop(offset_t size = 0);
<a name="l00209"></a>00209
<a name="l00216"></a>00216 ssize_t read(<span class="keywordtype">void</span> *buffer, <span class="keywordtype">size_t</span> count);
<a name="l00217"></a>00217
<a name="l00224"></a>00224 ssize_t write(<span class="keyword">const</span> <span class="keywordtype">void</span> *buffer, <span class="keywordtype">size_t</span> count);
<a name="l00225"></a>00225
<a name="l00231"></a>00231 <span class="keywordtype">int</span> stat(<span class="keyword">struct</span> stat *buffer);
<a name="l00232"></a>00232
<a name="l00239"></a>00239 <span class="keywordtype">int</span> trunc(offset_t offset);
<a name="l00240"></a>00240
<a name="l00245"></a>00245 <span class="keywordtype">int</span> sync(<span class="keywordtype">void</span>);
<a name="l00246"></a>00246
<a name="l00252"></a>00252 <span class="keyword">static</span> <span class="keywordtype">int</span> changeDir(<span class="keyword">const</span> <span class="keywordtype">char</span> *path);
<a name="l00253"></a>00253
<a name="l00260"></a>00260 <span class="keyword">static</span> <span class="keywordtype">int</span> getPrefix(<span class="keywordtype">char</span> *path, <span class="keywordtype">size_t</span> size);
<a name="l00261"></a>00261
<a name="l00268"></a>00268 <span class="keyword">static</span> <span class="keywordtype">int</span> stat(<span class="keyword">const</span> <span class="keywordtype">char</span> *path, <span class="keyword">struct</span> stat *buffer);
<a name="l00269"></a>00269
<a name="l00275"></a>00275 <span class="keyword">static</span> <span class="keywordtype">int</span> <span class="keyword">remove</span>(<span class="keyword">const</span> <span class="keywordtype">char</span> *path);
<a name="l00276"></a>00276
<a name="l00283"></a>00283 <span class="keyword">static</span> <span class="keywordtype">int</span> rename(<span class="keyword">const</span> <span class="keywordtype">char</span> *oldpath, <span class="keyword">const</span> <span class="keywordtype">char</span> *newpath);
<a name="l00284"></a>00284
<a name="l00291"></a>00291 <span class="keyword">static</span> <span class="keywordtype">int</span> change(<span class="keyword">const</span> <span class="keywordtype">char</span> *path, <span class="keywordtype">unsigned</span> mode);
<a name="l00292"></a>00292
<a name="l00299"></a>00299 <span class="keyword">static</span> <span class="keywordtype">int</span> <a class="code" href="a00214.html#ad6378c2aa4e17197d8e936674e5b2687" title="Convenience function to access (lock) shared object through it&#39;s protocol.">access</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *path, <span class="keywordtype">unsigned</span> mode);
<a name="l00300"></a>00300
<a name="l00306"></a>00306 <span class="keyword">static</span> <span class="keywordtype">bool</span> isfile(<span class="keyword">const</span> <span class="keywordtype">char</span> *path);
<a name="l00307"></a>00307
<a name="l00313"></a>00313 <span class="keyword">static</span> <span class="keywordtype">bool</span> isdir(<span class="keyword">const</span> <span class="keywordtype">char</span> *path);
<a name="l00314"></a>00314
<a name="l00315"></a>00315
<a name="l00323"></a><a class="code" href="a00056.html#a9ae16cb48da6505679bcd68da0a7d19a">00323</a> <span class="keyword">inline</span> <span class="keyword">static</span> ssize_t read(<a class="code" href="a00056.html" title="A container for generic and o/s portable threadsafe file system functions.">fsys</a>& descriptor, <span class="keywordtype">void</span> *buffer, <span class="keywordtype">size_t</span> count)
<a name="l00324"></a>00324 {<span class="keywordflow">return</span> descriptor.<a class="code" href="a00056.html#a052424814c714fe6dcbeefed67c082aa" title="Read data from descriptor or scan directory.">read</a>(buffer, count);};
<a name="l00325"></a>00325
<a name="l00333"></a><a class="code" href="a00056.html#a7447fe43ac0d1f49912180a0ea4ac735">00333</a> <span class="keyword">inline</span> <span class="keyword">static</span> ssize_t write(<a class="code" href="a00056.html" title="A container for generic and o/s portable threadsafe file system functions.">fsys</a>& descriptor, <span class="keyword">const</span> <span class="keywordtype">void</span> *buffer, <span class="keywordtype">size_t</span> count)
<a name="l00334"></a>00334 {<span class="keywordflow">return</span> descriptor.<a class="code" href="a00056.html#a558d55f7f98806833577b725de93bf29" title="Write data to descriptor.">write</a>(buffer, count);};
<a name="l00335"></a>00335
<a name="l00342"></a><a class="code" href="a00056.html#adcd71c7222118d926659d122599b92cc">00342</a> <span class="keyword">inline</span> <span class="keyword">static</span> <span class="keywordtype">int</span> seek(<a class="code" href="a00056.html" title="A container for generic and o/s portable threadsafe file system functions.">fsys</a>& descriptor, <a class="code" href="a00056.html#acd8d82ddbf77b2c44371f3bf19746f60" title="File offset type.">offset_t</a> offset)
<a name="l00343"></a>00343 {<span class="keywordflow">return</span> descriptor.<a class="code" href="a00056.html#a7625032c1759131bd42309491bc32bab" title="Set the position of a file descriptor.">seek</a>(offset);};
<a name="l00344"></a>00344
<a name="l00351"></a><a class="code" href="a00056.html#aa9de395f837e8b56d10b06c72dc3ccae">00351</a> <span class="keyword">inline</span> <span class="keyword">static</span> <span class="keywordtype">int</span> drop(<a class="code" href="a00056.html" title="A container for generic and o/s portable threadsafe file system functions.">fsys</a>& descriptor, <a class="code" href="a00056.html#acd8d82ddbf77b2c44371f3bf19746f60" title="File offset type.">offset_t</a> size)
<a name="l00352"></a>00352 {<span class="keywordflow">return</span> descriptor.<a class="code" href="a00056.html#acbc794b7770272bd38714006252e2db3" title="Drop cached data from start of file.">drop</a>(size);};
<a name="l00353"></a>00353
<a name="l00359"></a>00359 <span class="keywordtype">void</span> open(<span class="keyword">const</span> <span class="keywordtype">char</span> *path, access_t <a class="code" href="a00214.html#ad6378c2aa4e17197d8e936674e5b2687" title="Convenience function to access (lock) shared object through it&#39;s protocol.">access</a>);
<a name="l00360"></a>00360
<a name="l00365"></a><a class="code" href="a00056.html#ab846b18bc6bd48f8cafdeb37aa4d0a43">00365</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> assign(fd_t descriptor)
<a name="l00366"></a>00366 {close(); fd = descriptor;};
<a name="l00367"></a>00367
<a name="l00373"></a><a class="code" href="a00056.html#a1bc9357759868fbbebe5036794788263">00373</a> <span class="keyword">inline</span> <span class="keyword">static</span> <span class="keywordtype">void</span> assign(<a class="code" href="a00056.html" title="A container for generic and o/s portable threadsafe file system functions.">fsys</a>& <span class="keywordtype">object</span>, fd_t descriptor)
<a name="l00374"></a>00374 {<span class="keywordtype">object</span>.close(); <span class="keywordtype">object</span>.fd = descriptor;};
<a name="l00375"></a>00375
<a name="l00382"></a>00382 <span class="keywordtype">void</span> create(<span class="keyword">const</span> <span class="keywordtype">char</span> *path, access_t <a class="code" href="a00214.html#ad6378c2aa4e17197d8e936674e5b2687" title="Convenience function to access (lock) shared object through it&#39;s protocol.">access</a>, <span class="keywordtype">unsigned</span> mode);
<a name="l00383"></a>00383
<a name="l00390"></a>00390 <span class="keyword">static</span> <span class="keywordtype">int</span> createDir(<span class="keyword">const</span> <span class="keywordtype">char</span> *path, <span class="keywordtype">unsigned</span> mode);
<a name="l00391"></a>00391
<a name="l00397"></a>00397 <span class="keyword">static</span> <span class="keywordtype">int</span> removeDir(<span class="keyword">const</span> <span class="keywordtype">char</span> *path);
<a name="l00398"></a>00398
<a name="l00403"></a><a class="code" href="a00056.html#abbc045601d13615d2284212f7b491bc0">00403</a> <span class="keyword">inline</span> <span class="keyword">static</span> <span class="keywordtype">void</span> close(<a class="code" href="a00056.html" title="A container for generic and o/s portable threadsafe file system functions.">fsys</a>& descriptor)
<a name="l00404"></a>00404 {descriptor.<a class="code" href="a00056.html#abbc045601d13615d2284212f7b491bc0" title="Close a file descriptor or directory directly.">close</a>();};
<a name="l00405"></a>00405
<a name="l00409"></a>00409 <span class="keywordtype">void</span> close(<span class="keywordtype">void</span>);
<a name="l00410"></a>00410
<a name="l00417"></a><a class="code" href="a00056.html#a44ff51fd5fb76688464eeacffe3546ce">00417</a> <span class="keyword">inline</span> <span class="keyword">static</span> <span class="keywordtype">void</span> open(<a class="code" href="a00056.html" title="A container for generic and o/s portable threadsafe file system functions.">fsys</a>& <span class="keywordtype">object</span>, <span class="keyword">const</span> <span class="keywordtype">char</span> *path, <a class="code" href="a00056.html#a5e886a4f005b2a2948d2a3fb4e9f0deb" title="Enumerated file access modes.">access_t</a> <a class="code" href="a00214.html#ad6378c2aa4e17197d8e936674e5b2687" title="Convenience function to access (lock) shared object through it&#39;s protocol.">access</a>)
<a name="l00418"></a>00418 {<span class="keywordtype">object</span>.open(path, access);};
<a name="l00419"></a>00419
<a name="l00427"></a><a class="code" href="a00056.html#ad5c30b4d02ea68b1614ba834c1598d5c">00427</a> <span class="keyword">inline</span> <span class="keyword">static</span> <span class="keywordtype">void</span> create(<a class="code" href="a00056.html" title="A container for generic and o/s portable threadsafe file system functions.">fsys</a>& <span class="keywordtype">object</span>, <span class="keyword">const</span> <span class="keywordtype">char</span> *path, <a class="code" href="a00056.html#a5e886a4f005b2a2948d2a3fb4e9f0deb" title="Enumerated file access modes.">access_t</a> <a class="code" href="a00214.html#ad6378c2aa4e17197d8e936674e5b2687" title="Convenience function to access (lock) shared object through it&#39;s protocol.">access</a>, <span class="keywordtype">unsigned</span> mode)
<a name="l00428"></a>00428 {<span class="keywordtype">object</span>.create(path, access, mode);};
<a name="l00429"></a>00429
<a name="l00435"></a>00435 <span class="keyword">static</span> <span class="keywordtype">int</span> load(<span class="keyword">const</span> <span class="keywordtype">char</span> *path);
<a name="l00436"></a>00436
<a name="l00442"></a>00442 <span class="keyword">static</span> <span class="keywordtype">void</span> load(<a class="code" href="a00056.html" title="A container for generic and o/s portable threadsafe file system functions.">fsys</a>& module, <span class="keyword">const</span> <span class="keywordtype">char</span> *path);
<a name="l00443"></a>00443
<a name="l00448"></a>00448 <span class="keyword">static</span> <span class="keywordtype">void</span> unload(<a class="code" href="a00056.html" title="A container for generic and o/s portable threadsafe file system functions.">fsys</a>& module);
<a name="l00449"></a>00449
<a name="l00456"></a>00456 <span class="keyword">static</span> <span class="keywordtype">void</span> *find(<a class="code" href="a00056.html" title="A container for generic and o/s portable threadsafe file system functions.">fsys</a>& module, <span class="keyword">const</span> <span class="keywordtype">char</span> *symbol);
<a name="l00457"></a>00457
<a name="l00465"></a>00465 <span class="keyword">static</span> <span class="keywordtype">size_t</span> printf(FILE *file, <span class="keyword">const</span> <span class="keywordtype">char</span> *format, ...) __PRINTF(2, 3);
<a name="l00466"></a>00466
<a name="l00474"></a>00474 static <span class="keywordtype">size_t</span> writes(FILE *file, const <span class="keywordtype">char</span> *<span class="keywordtype">string</span>);
<a name="l00475"></a>00475
<a name="l00485"></a>00485 static <span class="keywordtype">size_t</span> readln(FILE *file, <span class="keywordtype">char</span> *address, <span class="keywordtype">size_t</span> size);
<a name="l00486"></a>00486 };
<a name="l00487"></a>00487
<a name="l00491"></a><a class="code" href="a00214.html#a4eb1e23c5c32aef654da390a1dd27087">00491</a> typedef <a class="code" href="a00056.html" title="A container for generic and o/s portable threadsafe file system functions.">fsys</a> <a class="code" href="a00056.html" title="A container for generic and o/s portable threadsafe file system functions.">fsys_t</a>;
<a name="l00492"></a>00492
<a name="l00493"></a>00493 END_NAMESPACE
<a name="l00494"></a>00494
<a name="l00495"></a>00495 <span class="preprocessor">#endif</span>
<a name="l00496"></a>00496 <span class="preprocessor"></span>
</pre></div></div>
<hr class="footer"/><address style="text-align: right;"><small>Generated on Tue Jul 6 08:22:01 2010 for UCommon by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
</body>
</html>
|