1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/html; charset=windows-1252" />
5<meta http-equiv="Content-Style-Type" content="text/css" />
6<title>FS_SetPathInfo</title>
7<link rel="stylesheet" href="../../css/nitro.css" type="text/css" />
8</head>
9<body>
10
11<h1>FS_SetPathInfo <img src="../../image/NTR.gif"align="middle"><img src="../../image/TWL.gif" align="middle"></h1>
12<h2>Syntax</h2>
13<pre><code>
14#include &lt;nitro/fs.h&gt;
15
16BOOL FS_SetPathInfo(const char *path, const <a href="../FSPathInfo.html">FSPathInfo</a> *info);
17</code></pre>
18
19<h2>Arguments</h2>
20<table style="width:100%">
21<tbody>
22<tr>
23<td style="width:13%"><em><strong>path</strong></em></td>
24<td style="width:87%">Path name of the file or directory whose information you want to change.</td>
25</tr>
26<tr>
27<td style="width:13%"><em><strong>info</strong></em></td>
28<td style="width:87%">Pointer to the <code><a href="../FSPathInfo.html">FSPathInfo</a></code> structure where the data to be changed is stored.</td>
29</tr>
30</tbody>
31</table>
32
33<h2>Return Values</h2>
34<p>Returns TRUE if the entry information for the specifed path was changed properly; returns FALSE otherwise. In case of failure, the error details can be obtained using <code><a href="../archive/FS_GetArchiveResultCode.html">FS_GetArchiveResultCode()</a></code>.</p>
35
36<h2>Description</h2>
37<p>Changes the entry information for the specified file or directory. If there is a file or directory at the specified path, this function changes the entry information and returns TRUE. The function returns FALSE in the following situations:
38</p>
39<ul>
40<li>If there is no file or directory at the specified path</li>
41<li>If the archive does not support the ability to change entry information</li>
42</ul>
43<p>Few archives support the ability to change entry information, and even when this is possible, it does not necessarily mean that all information that can be obtained with <code><a href="FS_GetPathInfo.html">FS_GetPathInfo()</a></code> can be changed at will. For example, with <a href="../archive_nand_spec.html">NAND archives</a> and <a href="../archive_sdmc_spec.html">SD card archives</a>, nothing can be changed except the <code><a href="../FSPathInfo.html">FS_ATTRIBUTE_DOS_READONLY</a></code> and <code><a href="../FSPathInfo.html">FS_ATTRIBUTE_DOS_ARCHIVE</a></code> bits, and the settings will be ignored. A simple example of this usage is shown below.</p>
44<pre><code>
45<span style="color:#008000">/* Remove the read-only attribute. */</span>
46<a href="../FSPathInfo.html">FSPathInfo</a> info[1];
47if (FS_GetPathInfo(path, info))
48{
49    info-&gt;attributes &amp;= ~FS_ATTRIBUTE_DOS_READONLY;
50    if (FS_SetPathInfo(path, info))
51    {
52        ...
53    }
54}
55</code></pre>
56
57<h2>Note</h2>
58<ul>
59<li>This function cannot be called from the interrupt handler (IRQ mode). Also note that in some cases processing may not end if interrupts are left prohibited.</li>
60</ul>
61
62<h2>See Also</h2>
63<p><code><a href="../FSPathInfo.html">FSPathInfo</a> <br /> <a href="FS_GetPathInfo.html">FS_GetPathInfo</a> <a href="../archive/FS_GetArchiveResultCode.html">FS_GetArchiveResultCode</a></code></p>
64
65<h2>Revision History</h2>
66<p>
672007/07/18 Initial version.
68</p>
69<hr><p>CONFIDENTIAL</p></body>
70</html>
71