xref: /third_party/FatFs/documents/doc/unlink.html (revision e6865dcd)
1e6865dcdSopenharmony_ci<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2e6865dcdSopenharmony_ci<html lang="en">
3e6865dcdSopenharmony_ci<head>
4e6865dcdSopenharmony_ci<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5e6865dcdSopenharmony_ci<meta http-equiv="Content-Style-Type" content="text/css">
6e6865dcdSopenharmony_ci<link rel="up" title="FatFs" href="../00index_e.html">
7e6865dcdSopenharmony_ci<link rel="alternate" hreflang="ja" title="Japanese" href="../ja/unlink.html">
8e6865dcdSopenharmony_ci<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
9e6865dcdSopenharmony_ci<title>FatFs - f_unlink</title>
10e6865dcdSopenharmony_ci</head>
11e6865dcdSopenharmony_ci
12e6865dcdSopenharmony_ci<body>
13e6865dcdSopenharmony_ci
14e6865dcdSopenharmony_ci<div class="para func">
15e6865dcdSopenharmony_ci<h2>f_unlink</h2>
16e6865dcdSopenharmony_ci<p>The f_unlink function removes a file or sub-directory from the volume.</p>
17e6865dcdSopenharmony_ci<pre>
18e6865dcdSopenharmony_ciFRESULT f_unlink (
19e6865dcdSopenharmony_ci  const TCHAR* <span class="arg">path</span>  <span class="c">/* [IN] Object name */</span>
20e6865dcdSopenharmony_ci);
21e6865dcdSopenharmony_ci</pre>
22e6865dcdSopenharmony_ci</div>
23e6865dcdSopenharmony_ci
24e6865dcdSopenharmony_ci<div class="para arg">
25e6865dcdSopenharmony_ci<h4>Parameter</h4>
26e6865dcdSopenharmony_ci<dl class="par">
27e6865dcdSopenharmony_ci<dt>path</dt>
28e6865dcdSopenharmony_ci<dd>Pointer to a null-terminated string that specifies the <a href="filename.html">file or sub-directory</a> to be removed.</dd>
29e6865dcdSopenharmony_ci</dl>
30e6865dcdSopenharmony_ci</div>
31e6865dcdSopenharmony_ci
32e6865dcdSopenharmony_ci
33e6865dcdSopenharmony_ci<div class="para ret">
34e6865dcdSopenharmony_ci<h4>Return Values</h4>
35e6865dcdSopenharmony_ci<p>
36e6865dcdSopenharmony_ci<a href="rc.html#ok">FR_OK</a>,
37e6865dcdSopenharmony_ci<a href="rc.html#de">FR_DISK_ERR</a>,
38e6865dcdSopenharmony_ci<a href="rc.html#ie">FR_INT_ERR</a>,
39e6865dcdSopenharmony_ci<a href="rc.html#nr">FR_NOT_READY</a>,
40e6865dcdSopenharmony_ci<a href="rc.html#ok">FR_NO_FILE</a>,
41e6865dcdSopenharmony_ci<a href="rc.html#np">FR_NO_PATH</a>,
42e6865dcdSopenharmony_ci<a href="rc.html#in">FR_INVALID_NAME</a>,
43e6865dcdSopenharmony_ci<a href="rc.html#dn">FR_DENIED</a>,
44e6865dcdSopenharmony_ci<a href="rc.html#wp">FR_WRITE_PROTECTED</a>,
45e6865dcdSopenharmony_ci<a href="rc.html#id">FR_INVALID_DRIVE</a>,
46e6865dcdSopenharmony_ci<a href="rc.html#ne">FR_NOT_ENABLED</a>,
47e6865dcdSopenharmony_ci<a href="rc.html#ns">FR_NO_FILESYSTEM</a>,
48e6865dcdSopenharmony_ci<a href="rc.html#tm">FR_TIMEOUT</a>,
49e6865dcdSopenharmony_ci<a href="rc.html#lo">FR_LOCKED</a>,
50e6865dcdSopenharmony_ci<a href="rc.html#nc">FR_NOT_ENOUGH_CORE</a>
51e6865dcdSopenharmony_ci</p>
52e6865dcdSopenharmony_ci</div>
53e6865dcdSopenharmony_ci
54e6865dcdSopenharmony_ci
55e6865dcdSopenharmony_ci<div class="para desc">
56e6865dcdSopenharmony_ci<h4>Description</h4>
57e6865dcdSopenharmony_ci<p>
58e6865dcdSopenharmony_ciIf condition of the object to be removed is applicable to the following terms, the function will be rejected.<ul>
59e6865dcdSopenharmony_ci<li>The file/sub-directory must not have read-only attribute (<tt>AM_RDO</tt>), or the function will be rejected with <tt>FR_DENIED</tt>.</li>
60e6865dcdSopenharmony_ci<li>The sub-directory must be empty and must not be current directory, or the function will be rejected with <tt>FR_DENIED</tt>.</li>
61e6865dcdSopenharmony_ci<li>The file/sub-directory must not be opened, or the <em>FAT volume can be collapsed</em>. It will be rejected safely when <a href="appnote.html#dup">file lock function</a> is enabled.</li>
62e6865dcdSopenharmony_ci</ul>
63e6865dcdSopenharmony_ci</div>
64e6865dcdSopenharmony_ci
65e6865dcdSopenharmony_ci
66e6865dcdSopenharmony_ci<div class="para comp">
67e6865dcdSopenharmony_ci<h4>QuickInfo</h4>
68e6865dcdSopenharmony_ci<p>Available when <tt><a href="config.html#fs_readonly">FF_FS_READONLY</a> == 0</tt> and <tt><a href="config.html#fs_minimize">FF_FS_MINIMIZE</a> == 0</tt>.</p>
69e6865dcdSopenharmony_ci</div>
70e6865dcdSopenharmony_ci
71e6865dcdSopenharmony_ci
72e6865dcdSopenharmony_ci<p class="foot"><a href="../00index_e.html">Return</a></p>
73e6865dcdSopenharmony_ci</body>
74e6865dcdSopenharmony_ci</html>
75