]>
Commit | Line | Data |
---|---|---|
53668523 L |
1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">\r |
2 | <html lang="en">\r | |
3 | <head>\r | |
289f6a14 | 4 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8">\r |
53668523 L |
5 | <meta http-equiv="Content-Style-Type" content="text/css">\r |
6 | <link rel="up" title="FatFs" href="../00index_e.html">\r | |
7 | <link rel="alternate" hreflang="ja" title="Japanese" href="../ja/chmod.html">\r | |
8 | <link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">\r | |
9 | <title>FatFs - f_chmod</title>\r | |
10 | </head>\r | |
11 | \r | |
12 | <body>\r | |
13 | \r | |
14 | <div class="para func">\r | |
15 | <h2>f_chmod</h2>\r | |
16 | <p>The f_chmod function changes the attribute of a file or sub-directory.</p>\r | |
17 | <pre>\r | |
18 | FRESULT f_chmod (\r | |
19 | const TCHAR* <span class="arg">path</span>, <span class="c">/* [IN] Object name */</span>\r | |
20 | BYTE <span class="arg">attr</span>, <span class="c">/* [IN] Attribute flags */</span>\r | |
21 | BYTE <span class="arg">mask</span> <span class="c">/* [IN] Attribute masks */</span>\r | |
22 | );\r | |
23 | </pre>\r | |
24 | </div>\r | |
25 | \r | |
26 | <div class="para arg">\r | |
27 | <h4>Parameters</h4>\r | |
28 | <dl class="par">\r | |
29 | <dt>path</dt>\r | |
30 | <dd>Pointer to the null-terminated string that specifies an <a href="filename.html">object</a> to be changed</dd>\r | |
31 | <dt>attr</dt>\r | |
32 | <dd>Attribute flags to be set in one or more combination of the following flags. The specified flags are set and others are cleard.<br>\r | |
33 | <table class="lst">\r | |
34 | <tr><th>Attribute</th><th>Description</th></tr>\r | |
35 | <tr><td>AM_RDO</td><td>Read only</td></tr>\r | |
36 | <tr><td>AM_ARC</td><td>Archive</td></tr>\r | |
37 | <tr><td>AM_SYS</td><td>System</td></tr>\r | |
38 | <tr><td>AM_HID</td><td>Hidden</td></tr>\r | |
39 | </table>\r | |
40 | </dd>\r | |
41 | <dt>mask</dt>\r | |
42 | <dd>Attribute mask that specifies which attribute is changed. The specified attributes are set or cleard and others are left unchanged.</dd>\r | |
43 | </dl>\r | |
44 | </div>\r | |
45 | \r | |
46 | \r | |
47 | <div class="para ret">\r | |
48 | <h4>Return Values</h4>\r | |
49 | <p>\r | |
50 | <a href="rc.html#ok">FR_OK</a>,\r | |
51 | <a href="rc.html#de">FR_DISK_ERR</a>,\r | |
52 | <a href="rc.html#ie">FR_INT_ERR</a>,\r | |
53 | <a href="rc.html#nr">FR_NOT_READY</a>,\r | |
54 | <a href="rc.html#ok">FR_NO_FILE</a>,\r | |
55 | <a href="rc.html#np">FR_NO_PATH</a>,\r | |
56 | <a href="rc.html#in">FR_INVALID_NAME</a>,\r | |
57 | <a href="rc.html#wp">FR_WRITE_PROTECTED</a>,\r | |
58 | <a href="rc.html#id">FR_INVALID_DRIVE</a>,\r | |
59 | <a href="rc.html#ne">FR_NOT_ENABLED</a>,\r | |
60 | <a href="rc.html#ns">FR_NO_FILESYSTEM</a>,\r | |
61 | <a href="rc.html#tm">FR_TIMEOUT</a>,\r | |
62 | <a href="rc.html#nc">FR_NOT_ENOUGH_CORE</a>\r | |
63 | </p>\r | |
64 | </div>\r | |
65 | \r | |
66 | \r | |
67 | <div class="para desc">\r | |
68 | <h4>Description</h4>\r | |
70702af1 | 69 | <p>The <tt>f_chmod</tt> function changes the attribute of a file or sub-directory.</p>\r |
53668523 L |
70 | </div>\r |
71 | \r | |
72 | \r | |
73 | <div class="para comp">\r | |
74 | <h4>QuickInfo</h4>\r | |
289f6a14 | 75 | <p>Available when <tt><a href="config.html#fs_readonly">FF_FS_READONLY</a> == 0</tt> and <tt><a href="config.html#use_chmod">FF_USE_CHMOD</a> == 1</tt>.</p>\r |
53668523 L |
76 | </div>\r |
77 | \r | |
78 | \r | |
79 | <div class="para use">\r | |
80 | <h4>Example</h4>\r | |
81 | <pre>\r | |
289f6a14 L |
82 | <span class="c">/* Set Read-only, clear Archive and others are left unchanged. */</span>\r |
83 | <em>f_chmod</em>("file.txt", AM_RDO, AM_RDO | AM_ARC);\r | |
53668523 L |
84 | </pre>\r |
85 | </div>\r | |
86 | \r | |
87 | <p class="foot"><a href="../00index_e.html">Return</a></p>\r | |
88 | </body>\r | |
89 | </html>\r |