OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [freertos-6.1.1/] [Demo/] [Common/] [FileSystem/] [FatFs-0.7e/] [doc/] [en/] [chmod.html] - Blame information for rev 606

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 606 jeremybenn
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2
<html lang="en">
3
<head>
4
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
5
<meta http-equiv="Content-Style-Type" content="text/css">
6
<link rel="up" title="FatFs" href="../00index_e.html">
7
<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
8
<title>FatFs - f_chmod</title>
9
</head>
10
 
11
<body>
12
 
13
<div class="para">
14
<h2>f_chmod</h2>
15
<p>The f_chmod function changes the attribute of a file or directory.</p>
16
<pre>
17
FRESULT f_chmod (
18
  const XCHAR* <em>FileName</em>, /* Pointer to the file or directory */
19
  BYTE <em>Attribute</em>,        /* Attribute flags */
20
  BYTE <em>AttributeMask</em>     /* Attribute masks */
21
);
22
</pre>
23
</div>
24
 
25
<div class="para">
26
<h4>Parameters</h4>
27
<dl class="par">
28
<dt>FileName</dt>
29
<dd>Pointer to the null-terminated string that specifies a <a href="filename.html">file or directory</a> to be changed</dd>
30
<dt>Attribute</dt>
31
<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>
32
<table class="lst">
33
<tr><th>Attribute</th><th>Description</th></tr>
34
<tr><td>AM_RDO</td><td>Read only</td></tr>
35
<tr><td>AM_ARC</td><td>Archive</td></tr>
36
<tr><td>AM_SYS</td><td>System</td></tr>
37
<tr><td>AM_HID</td><td>Hidden</td></tr>
38
</table>
39
</dd>
40
<dt>AttributeMask</dt>
41
<dd>Attribute mask that specifies which attribute is changed. The specified aattributes are set or cleard.</dd>
42
</dl>
43
</div>
44
 
45
 
46
<div class="para">
47
<h4>Return Values</h4>
48
<dl class="ret">
49
<dt>FR_OK (0)</dt>
50
<dd>The function succeeded.</dd>
51
<dt>FR_NO_FILE</dt>
52
<dd>Could not find the file.</dd>
53
<dt>FR_NO_PATH</dt>
54
<dd>Could not find the path.</dd>
55
<dt>FR_INVALID_NAME</dt>
56
<dd>The file name is invalid.</dd>
57
<dt>FR_INVALID_DRIVE</dt>
58
<dd>The drive number is invalid.</dd>
59
<dt>FR_NOT_READY</dt>
60
<dd>The disk drive cannot work due to no medium in the drive or any other reason.</dd>
61
<dt>FR_WRITE_PROTECTED</dt>
62
<dd>The medium is write protected.</dd>
63
<dt>FR_DISK_ERR</dt>
64
<dd>The function failed due to an error in the disk function.</dd>
65
<dt>FR_INT_ERR</dt>
66
<dd>The function failed due to a wrong FAT structure or an internal error.</dd>
67
<dt>FR_NOT_ENABLED</dt>
68
<dd>The logical drive has no work area.</dd>
69
<dt>FR_NO_FILESYSTEM</dt>
70
<dd>There is no valid FAT volume on the disk.</dd>
71
</dl>
72
</div>
73
 
74
 
75
<div class="para">
76
<h4>Description</h4>
77
<p>The f_chmod function changes the attribute of a file or directory.</p>
78
</div>
79
 
80
 
81
<div class="para">
82
<h4>QuickInfo</h4>
83
<p>Available when <tt>_FS_READONLY == 0</tt> and <tt>_FS_MINIMIZE == 0</tt>.</p>
84
</div>
85
 
86
 
87
<div class="para">
88
<h4>Example</h4>
89
<pre>
90
    // Set read-only flag, clear archive flag and others are retained.
91
    f_chmod("file.txt", AR_RDO, AR_RDO | AR_ARC);
92
</pre>
93
</div>
94
 
95
<p class="foot"><a href="../00index_e.html">Return</a></p>
96
</body>
97
</html>

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.