]> cloudbase.mooo.com Git - z180-stamp.git/blobdiff - fatfs/documents/doc/chmod.html
Import fatfs R0.13b
[z180-stamp.git] / fatfs / documents / doc / chmod.html
diff --git a/fatfs/documents/doc/chmod.html b/fatfs/documents/doc/chmod.html
new file mode 100644 (file)
index 0000000..91e520f
--- /dev/null
@@ -0,0 +1,89 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">\r
+<html lang="en">\r
+<head>\r
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">\r
+<meta http-equiv="Content-Style-Type" content="text/css">\r
+<link rel="up" title="FatFs" href="../00index_e.html">\r
+<link rel="alternate" hreflang="ja" title="Japanese" href="../ja/chmod.html">\r
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">\r
+<title>FatFs - f_chmod</title>\r
+</head>\r
+\r
+<body>\r
+\r
+<div class="para func">\r
+<h2>f_chmod</h2>\r
+<p>The f_chmod function changes the attribute of a file or sub-directory.</p>\r
+<pre>\r
+FRESULT f_chmod (\r
+  const TCHAR* <span class="arg">path</span>, <span class="c">/* [IN] Object name */</span>\r
+  BYTE <span class="arg">attr</span>,         <span class="c">/* [IN] Attribute flags */</span>\r
+  BYTE <span class="arg">mask</span>          <span class="c">/* [IN] Attribute masks */</span>\r
+);\r
+</pre>\r
+</div>\r
+\r
+<div class="para arg">\r
+<h4>Parameters</h4>\r
+<dl class="par">\r
+<dt>path</dt>\r
+<dd>Pointer to the null-terminated string that specifies an <a href="filename.html">object</a> to be changed</dd>\r
+<dt>attr</dt>\r
+<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
+<table class="lst">\r
+<tr><th>Attribute</th><th>Description</th></tr>\r
+<tr><td>AM_RDO</td><td>Read only</td></tr>\r
+<tr><td>AM_ARC</td><td>Archive</td></tr>\r
+<tr><td>AM_SYS</td><td>System</td></tr>\r
+<tr><td>AM_HID</td><td>Hidden</td></tr>\r
+</table>\r
+</dd>\r
+<dt>mask</dt>\r
+<dd>Attribute mask that specifies which attribute is changed. The specified attributes are set or cleard and others are left unchanged.</dd>\r
+</dl>\r
+</div>\r
+\r
+\r
+<div class="para ret">\r
+<h4>Return Values</h4>\r
+<p>\r
+<a href="rc.html#ok">FR_OK</a>,\r
+<a href="rc.html#de">FR_DISK_ERR</a>,\r
+<a href="rc.html#ie">FR_INT_ERR</a>,\r
+<a href="rc.html#nr">FR_NOT_READY</a>,\r
+<a href="rc.html#ok">FR_NO_FILE</a>,\r
+<a href="rc.html#np">FR_NO_PATH</a>,\r
+<a href="rc.html#in">FR_INVALID_NAME</a>,\r
+<a href="rc.html#wp">FR_WRITE_PROTECTED</a>,\r
+<a href="rc.html#id">FR_INVALID_DRIVE</a>,\r
+<a href="rc.html#ne">FR_NOT_ENABLED</a>,\r
+<a href="rc.html#ns">FR_NO_FILESYSTEM</a>,\r
+<a href="rc.html#tm">FR_TIMEOUT</a>,\r
+<a href="rc.html#nc">FR_NOT_ENOUGH_CORE</a>\r
+</p>\r
+</div>\r
+\r
+\r
+<div class="para desc">\r
+<h4>Description</h4>\r
+<p>The <tt>f_chmod</tt> function changes the attribute of a file or sub-directory.</p>\r
+</div>\r
+\r
+\r
+<div class="para comp">\r
+<h4>QuickInfo</h4>\r
+<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
+</div>\r
+\r
+\r
+<div class="para use">\r
+<h4>Example</h4>\r
+<pre>\r
+    <span class="c">/* Set Read-only, clear Archive and others are left unchanged. */</span>\r
+    <em>f_chmod</em>("file.txt", AM_RDO, AM_RDO | AM_ARC);\r
+</pre>\r
+</div>\r
+\r
+<p class="foot"><a href="../00index_e.html">Return</a></p>\r
+</body>\r
+</html>\r