1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xml:lang="en-US" lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
3  <head>
4    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5    <meta http-equiv="Content-Style-Type" content="text/css" />
6    <link rel="stylesheet" href="../../css/manpage.css" type="text/css" />
7    <style type="text/css"><!--
8      span.static_style
9      {
10        font-size			: 8pt;
11        color				: white;
12        font-weight			: bold;
13        background			: #44f;
14        border-left			: solid 1px #aaf;
15        border-top			: solid 1px #aaf;
16        border-right		: solid 1px #00c;
17        border-bottom		: solid 1px #00c;
18        padding-left		: 2px;
19        padding-right		: 2px;
20      }
21
22      span.virtual_style
23      {
24        font-size			 : 8pt;
25        color				 : white;
26        font-weight			: bold;
27        background			: #0a0;
28        border-left			: solid 1px #0f0;
29        border-top			: solid 1px #0f0;
30        border-right		: solid 1px #060;
31        border-bottom		: solid 1px #060;
32        padding-left		: 2px;
33        padding-right		: 2px;
34      }
35
36      span.protected_style
37      {
38        font-size			 : 8pt;
39        color				 : white;
40        font-weight			: bold;
41        background			: #444;
42        border-left			: solid 1px #ccc;
43        border-top			: solid 1px #ccc;
44        border-right		: solid 1px #222;
45        border-bottom		: solid 1px #222;
46        padding-left		: 2px;
47        padding-right		: 2px;
48      }
49        --></style>
50<title>nn::fs</title>
51  </head>
52  <body>
53<h1><CODE>nn::fs</CODE> Namespace</h1>
54<h2>Description</h2>
55    <div class="section">
56<p>Namespace for the file system API.</p><p>You must first call the <a href="../../nn/fs/Initialize.html"><CODE>nn::fs::Initialize</CODE></a> function to initialize the library before using any of the functions or classes in the <CODE><a href="../../nn/fs/Overview.html">nn::fs</a></CODE> namespace.<br /></p><p>
57The CTR file system is a collection of <I>archives</I> distinguished by their <I>archive names</I>. Each archive identifies files and directories and carries out the specified operation by receiving <I>archive path name</I>. Archive types differ in various ways such as their available operations, their restrictions on path names, and the number of files that can be opened, but all types can generally be accessed using the same interface.</p><a href="briefing/aboutArchive.html">Archives</a><br /><p>
58The fs method of writing code for error handling is different than for other libraries.<br />In addition, the ways in which returned <CODE>Result</CODE> values are handled may differ depending on the type of archive being handled.<br /></p><a href="briefing/aboutErrorHandling.html">Error Handling</a><br /></div>
59    <a name="namespace" id="namespace">
60<h2>Namespaces</h2>
61      <div class="section">
62        <table class="members">
63          <tr>
64            <th>
65<a href="../../nn/fs/hio/Overview.html"><CODE>nn::fs::hio</CODE></a>
66            </th>
67<td>A namespace that includes functions used to directly access files on a PC (for debugging purposes).</td>
68          </tr> </table>
69      </div>
70    </a> <a name="class" id="class">
71<h2>Classes</h2>
72      <div class="section">
73        <table class="members">
74          <tr>
75<th class="category" colspan="2">File and Directory Operations</th>
76          </tr>
77          <tr>
78            <th>
79<a href="../../nn/fs/Directory/Overview.html"><CODE>nn::fs::Directory</CODE></a>
80            </th>
81<td>A class used for directory operations.</td>
82          </tr>
83          <tr>
84            <th>
85<a href="../../nn/fs/FileInputStream/Overview.html"><CODE>nn::fs::FileInputStream</CODE></a>
86            </th>
87<td>Class for reading from files.</td>
88          </tr>
89          <tr>
90            <th>
91<a href="../../nn/fs/FileOutputStream/Overview.html"><CODE>nn::fs::FileOutputStream</CODE></a>
92            </th>
93<td>Class for writing to files.</td>
94          </tr>
95          <tr>
96            <th>
97<a href="../../nn/fs/FileStream/Overview.html"><CODE>nn::fs::FileStream</CODE></a>
98            </th>
99<td>Class for reading from and writing to files.</td>
100          </tr>
101          <tr>
102<th class="category" colspan="2">Result</th>
103          </tr>
104          <tr>
105            <th>
106<a href="../../nn/fs/ResultNotFound/Overview.html"><CODE>nn::fs::ResultNotFound</CODE></a>
107            </th>
108<td>File or archive not found.</td>
109          </tr>
110          <tr>
111            <th>
112<a href="../../nn/fs/ResultMediaNotFound/Overview.html">nn::fs::ResultMediaNotFound</a>
113            </th>
114<td>Media not Found, Recognized. Errors Associated with <CODE>ResultNotFound</CODE>.</td>
115          </tr>
116          <tr>
117            <th>
118<a href="../../nn/fs/ResultAlreadyExists/Overview.html"><CODE>nn::fs::ResultAlreadyExists</CODE></a>
119            </th>
120<td>File or archive already exists.</td>
121          </tr>
122          <tr>
123            <th>
124<a href="../../nn/fs/ResultNotEnoughSpace/Overview.html"><CODE>nn::fs::ResultNotEnoughSpace</CODE></a>
125            </th>
126<td>Insufficient free space.</td>
127          </tr>
128          <tr>
129            <th>
130<a href="../../nn/fs/ResultArchiveInvalidated/Overview.html"><CODE>nn::fs::ResultArchiveInvalidated</CODE></a>
131            </th>
132<td>Invalid archive.</td>
133          </tr>
134          <tr>
135            <th>
136<a href="../../nn/fs/ResultOperationDenied/Overview.html"><CODE>nn::fs::ResultOperationDenied</CODE></a>
137            </th>
138<td>Operation denied.</td>
139          </tr>
140          <tr>
141            <th>
142<a href="../../nn/fs/ResultWriteProtected/Overview.html">nn::fs::ResultWriteProtected</a>
143            </th>
144<td>Media is Write-protected. Errors Associated with <CODE>ResultOperationDenied</CODE>.</td>
145          </tr>
146          <tr>
147            <th>
148<a href="../../nn/fs/ResultMediaAccessError/Overview.html">nn::fs::ResultMediaAccessError</a>
149            </th>
150<td>Errors Occurring during Media Access. Errors Associated with <CODE>ResultOperationDenied</CODE>.</td>
151          </tr>
152          <tr>
153            <th>
154<a href="../../nn/fs/ResultNotFormatted/Overview.html"><CODE>nn::fs::ResultNotFormatted</CODE></a>
155            </th>
156<td>Not formatted.</td>
157          </tr>
158          <tr>
159            <th>
160<a href="../../nn/fs/ResultBadFormat/Overview.html"><CODE>nn::fs::ResultBadFormat</CODE></a>
161            </th>
162<td>Invalid format.</td>
163          </tr>
164          <tr>
165            <th>
166<a href="../../nn/fs/ResultVerificationFailed/Overview.html"><CODE>nn::fs::ResultVerificationFailed</CODE></a>
167            </th>
168<td>Verification failed.</td>
169          </tr> </table>
170      </div>
171    </a> <a name="enum" id="enum">
172<h2>Enumerated Types</h2>
173      <div class="section">
174        <table class="members">
175          <tr>
176            <td width="100"> </td>
177            <th>
178<a href="../../nn/fs/OpenMode.html">OpenMode</a>
179            </th>
180<td>Enumerated type that indicates the file's open mode.</td>
181          </tr>
182          <tr>
183            <td width="100"> </td>
184            <th>
185<a href="../../nn/fs/PositionBase.html"><CODE>PositionBase</CODE></a>
186            </th>
187<td>Group of constants that indicate the position of file read/writes.</td>
188          </tr> </table>
189      </div>
190    </a> <a name="typedef" id="typedef">
191<h2><CODE>typedef</CODE> Definitions</h2>
192      <div class="section">
193        <table class="members">
194          <tr>
195            <td width="100" />
196            <th>
197<a href="../../nn/fs/FileReader.html"><CODE>FileReader</CODE></a>
198            </th>
199<td>A <CODE>typedef</CODE> for <CODE><a href="../../nn/fs/FileInputStream/Overview.html">FileInputStream</a></CODE>.</td>
200          </tr>
201          <tr>
202            <td width="100" />
203            <th>
204<a href="../../nn/fs/FileWriter.html"><CODE>FileWriter</CODE></a>
205            </th>
206<td><a href="../../nn/fs/FileOutputStream/Overview.html">FileOutputStream</a> type definition.</td>
207          </tr> </table>
208      </div>
209    </a> <a name="function" id="function">
210<h2>Functions</h2>
211      <div class="section">
212        <table class="members">
213          <tr>
214<th class="category" colspan="3">ROM Archives</th>
215          </tr>
216          <tr>
217            <td width="100">  </td>
218            <th>
219<a href="../../nn/fs/GetRomRequiredMemorySize.html"><CODE>GetRomRequiredMemorySize</CODE></a>
220            </th>
221<td>Gets the size of memory needed to mount a ROM archive.</td>
222          </tr>
223          <tr>
224            <td width="100">  </td>
225            <th>
226<a href="../../nn/fs/MountRom.html"><CODE>MountRom</CODE></a>
227            </th>
228<td>Mounts a ROM archive.</td>
229          </tr>
230          <tr>
231<th class="category" colspan="3">Save Data Archives</th>
232          </tr>
233          <tr>
234            <td width="100">  </td>
235            <th>
236<a href="../../nn/fs/FormatSaveData.html"><CODE>FormatSaveData</CODE></a>
237            </th>
238<td>Formats a save data region.</td>
239          </tr>
240          <tr>
241            <td width="100">  </td>
242            <th>
243<a href="../../nn/fs/MountSaveData.html"><CODE>MountSaveData</CODE></a>
244            </th>
245<td>Mounts a save data archive.</td>
246          </tr>
247          <tr>
248            <td width="100">  </td>
249            <th>
250<a href="../../nn/fs/CommitSaveData.html"><CODE>CommitSaveData</CODE></a>
251            </th>
252<td>Commits a change to the save data.</td>
253          </tr>
254          <tr>
255<th class="category" colspan="3">Expanded Save Data Archive</th>
256          </tr>
257          <tr>
258            <td width="100">  </td>
259            <th>
260<a href="../../nn/fs/CreateExtSaveData.html">CreateExtSaveData</a>
261            </th>
262<td>Creates an expanded save data memory region.</td>
263          </tr>
264          <tr>
265            <td width="100">  </td>
266            <th>
267<a href="../../nn/fs/MountExtSaveData.html"><CODE>MountExtSaveData</CODE></a>
268            </th>
269<td>Mounts expanded save data.</td>
270          </tr>
271          <tr>
272            <td width="100">  </td>
273            <th>
274<a href="../../nn/fs/DeleteExtSaveData.html">DeleteExtSaveData</a>
275            </th>
276<td>Deletes expanded save data.</td>
277          </tr>
278          <tr>
279<th class="category" colspan="3">For debugging purposes.</th>
280          </tr>
281          <tr>
282            <td width="100">  </td>
283            <th>
284<a href="../../nn/fs/MountSdmc.html">MountSdmc</a>
285            </th>
286<td>Mounts an archive that directly accesses the SD Memory Card (for debugging only).</td>
287          </tr>
288          <tr>
289            <td width="100">  </td>
290            <th>
291<a href="../../nn/fs/ForceEnableLatencyEmulation.html"><CODE>ForceEnableLatencyEmulation</CODE></a>
292            </th>
293<td>Emulates the behavior of a non-volatile memory device that has become degraded. (for debugging purposes)</td>
294          </tr>
295          <tr>
296            <td width="100">  </td>
297            <th>
298<a href="../../nn/fs/ForceDisableLatencyEmulation.html"><CODE>ForceDisableLatencyEmulation</CODE></a>
299            </th>
300<td>Turns off the function to emulate the behavior of a non-volatile memory device that has become degraded. (for debugging purposes)</td>
301          </tr>
302          <tr>
303<th class="category" colspan="3">Initialization</th>
304          </tr>
305          <tr>
306            <td width="100">  </td>
307            <th>
308<a href="../../nn/fs/Initialize.html"><CODE>Initialize</CODE></a>
309            </th>
310<td>Initializes the FS library.</td>
311          </tr>
312          <tr>
313<th class="category" colspan="3">SD Card</th>
314          </tr>
315          <tr>
316            <td width="100">  </td>
317            <th>
318<a href="../../nn/fs/RegisterSdmcInsertedEvent.html">RegisterSdmcInsertedEvent</a>
319            </th>
320<td>Registers the <a href="../../../nn/os/LightEvent/Overview.html"><CODE>nn::os::LightEvent</CODE></a> object that is signaled when an SD Memory Card is inserted.</td>
321          </tr>
322          <tr>
323            <td width="100">  </td>
324            <th>
325<a href="../../nn/fs/UnregisterSdmcInsertedEvent.html">UnregisterSdmcInsertedEvent</a>
326            </th>
327<td>Unregisters the <a href="../../nn/fs/RegisterSdmcInsertedEvent.html">nn::fs::RegisterSdmcInsertedEvent</a> object.</td>
328          </tr>
329          <tr>
330            <td width="100">  </td>
331            <th>
332<a href="../../nn/fs/RegisterSdmcEjectedEvent.html">RegisterSdmcEjectedEvent</a>
333            </th>
334<td>Registers the <a href="../../../nn/os/LightEvent/Overview.html"><CODE>nn::os::LightEvent</CODE></a> object that is signaled when an SD Memory Card is pulled out.</td>
335          </tr>
336          <tr>
337            <td width="100">  </td>
338            <th>
339<a href="../../nn/fs/UnregisterSdmcEjectedEvent.html">UnregisterSdmcEjectedEvent</a>
340            </th>
341<td>Unregisters the <a href="../../nn/fs/RegisterSdmcEjectedEvent.html">nn::fs::RegisterSdmcEjectedEvent</a> object.</td>
342          </tr>
343          <tr>
344            <td width="100">  </td>
345            <th>
346<a href="../../nn/fs/IsSdmcInserted.html"><CODE>IsSdmcInserted</CODE></a>
347            </th>
348<td>Returns a value indicating whether an SD Card has been inserted.</td>
349          </tr>
350          <tr>
351            <td width="100">  </td>
352            <th>
353<a href="../../nn/fs/IsSdmcWritable.html"><CODE>IsSdmcWritable</CODE></a>
354            </th>
355<td>Returns a value indicating whether an SD Card is writable.</td>
356          </tr>
357          <tr>
358<th class="category" colspan="3">File and Directory Operations</th>
359          </tr>
360          <tr>
361            <td width="100">  </td>
362            <th>
363<a href="../../nn/fs/DeleteFile.html"><CODE>DeleteFile</CODE></a>
364            </th>
365<td>Deletes a file.</td>
366          </tr>
367          <tr>
368            <td width="100">  </td>
369            <th>
370<a href="../../nn/fs/TryDeleteFile.html"><CODE>TryDeleteFile</CODE></a>
371            </th>
372<td>Deletes a file.</td>
373          </tr>
374          <tr>
375            <td width="100">  </td>
376            <th>
377<a href="../../nn/fs/RenameFile.html"><CODE>RenameFile</CODE></a>
378            </th>
379<td>Renames a file.</td>
380          </tr>
381          <tr>
382            <td width="100">  </td>
383            <th>
384<a href="../../nn/fs/TryRenameFile.html"><CODE>TryRenameFile</CODE></a>
385            </th>
386<td>Renames a file.</td>
387          </tr>
388          <tr>
389            <td width="100">  </td>
390            <th>
391<a href="../../nn/fs/DeleteDirectory.html"><CODE>DeleteDirectory</CODE></a>
392            </th>
393<td>Deletes a directory.</td>
394          </tr>
395          <tr>
396            <td width="100">  </td>
397            <th>
398<a href="../../nn/fs/TryDeleteDirectory.html"><CODE>TryDeleteDirectory</CODE></a>
399            </th>
400<td>Deletes a directory.</td>
401          </tr>
402          <tr>
403            <td width="100">  </td>
404            <th>
405<a href="../../nn/fs/TryDeleteDirectoryRecursively.html">TryDeleteDirectoryRecursively</a>
406            </th>
407<td>Deletes directories recursively.</td>
408          </tr>
409          <tr>
410            <td width="100">  </td>
411            <th>
412<a href="../../nn/fs/CreateFile.html"><CODE>CreateFile</CODE></a>
413            </th>
414<td>Creates a file.</td>
415          </tr>
416          <tr>
417            <td width="100">  </td>
418            <th>
419<a href="../../nn/fs/TryCreateFile.html"><CODE>TryCreateFile</CODE></a>
420            </th>
421<td>Creates a file.</td>
422          </tr>
423          <tr>
424            <td width="100">  </td>
425            <th>
426<a href="../../nn/fs/CreateDirectory.html"><CODE>CreateDirectory</CODE></a>
427            </th>
428<td>Creates a directory.</td>
429          </tr>
430          <tr>
431            <td width="100">  </td>
432            <th>
433<a href="../../nn/fs/TryCreateDirectory.html"><CODE>TryCreateDirectory</CODE></a>
434            </th>
435<td>Creates a directory.</td>
436          </tr>
437          <tr>
438            <td width="100">  </td>
439            <th>
440<a href="../../nn/fs/RenameDirectory.html"><CODE>RenameDirectory</CODE></a>
441            </th>
442<td>Renames a directory.</td>
443          </tr>
444          <tr>
445            <td width="100">  </td>
446            <th>
447<a href="../../nn/fs/TryRenameDirectory.html"><CODE>TryRenameDirectory</CODE></a>
448            </th>
449<td>Renames a directory.</td>
450          </tr>
451          <tr>
452<th class="category" colspan="3">Other</th>
453          </tr>
454          <tr>
455            <td width="100">  </td>
456            <th>
457<a href="../../nn/fs/Unmount.html"><CODE>Unmount</CODE></a>
458            </th>
459<td>Unmounts an archive.</td>
460          </tr>
461          <tr>
462            <td width="100">  </td>
463            <th>
464<a href="../../nn/fs/GetArchiveFreeBytes.html">GetArchiveFreeBytes</a>
465            </th>
466<td>Gets the amount of free space in the archive.</td>
467          </tr> </table>
468      </div>
469    </a>
470<h2>Revision History</h2>
471    <div class="section">
472      <dl class="history">
473        <dt>2010/11/13</dt>
474<dd>Added the <CODE>CommitSaveData</CODE> and <CODE>DeleteExtSaveData</CODE> functions.
475        </dd>
476        <dt>2010/11/09</dt>
477<dd>Deleted the <CODE>GetFileSystemSize</CODE> and <CODE>ReadExtSaveDataIcon</CODE> functions.
478<br />        </dd>
479        <dt>2010/10/30</dt>
480<dd>Added archive limitations, explanation about <CODE>Result</CODE> objects.
481        </dd>
482        <dt>2010/09/22</dt>
483<dd>Added a description of expanded save data.<BR>
484        </dd>
485        <dt>2010/09/10</dt>
486<dd>Added the <CODE>MountSdmc</CODE> function.<BR>
487        </dd>
488        <dt>2010/09/09</dt>
489<dd>Deleted the <CODE>InitializeForFileSystemEvent</CODE>, <CODE>WaitForInsertSdmc</CODE>, and <CODE>WaitForEjectSdmc</CODE> functions. Added the <CODE>RegisterSdmcInsertedEvent</CODE>, <CODE>UnregisterSdmcInsertedEvent</CODE>, <CODE>RegisterSdmcEjectedEvent</CODE>, and <CODE>UnregisterSdmcEjectedEvent</CODE> functions.<br />
490        </dd>
491        <dt>2010/01/07</dt>
492<dd>Initial version.<br />
493        </dd>
494      </dl>
495    </div>
496  <hr><p>CONFIDENTIAL</p></body>
497</html>