⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 syscalls_27.html

📁 Linux系统调用
💻 HTML
字号:
<!-- This HTML file has been created by texi2html 1.29
     from syscalls.texi on 4 June 1994 -->

<TITLE>Syscall specifications of Linux - rename</TITLE>
<P>Go to the <A HREF="syscalls_26.html" tppabs="http://personal.xfol.com/%7erezaie/syscall/syscalls_26.html">previous</A>, <A HREF="syscalls_28.html" tppabs="http://personal.xfol.com/%7erezaie/syscall/syscalls_28.html">next</A> section.<P>
<H2><A NAME="SEC27" HREF="syscalls_toc.html#SEC27" tppabs="http://personal.xfol.com/%7erezaie/syscall/syscalls_toc.html#SEC27">rename</A></H2>
<P>
<H3>SYNOPSIS</H3>
<P>
<CODE>int rename(const char *<VAR>src</VAR>, const char *<VAR>dest</VAR>);</CODE>
<P>
<H3>PARAMETERS</H3>
<P>
<VAR>src</VAR>: [in] the file to more/rename.
<P>
<VAR>dest</VAR>: [in] the new name or place for the file.
<P>
<H3>DESCRIPTION</H3>
<P>
Renames and move files. The destination is overwriten if it already exists.
<P>
<H3>RETURN VALUE</H3>
<P>
On success, returns zero. On error, returns -1 and sets <CODE>errno</CODE> to
one of the following value:
<P>
<UL>
<LI><CODE>EISDIR</CODE>: <VAR>newpath</VAR> is an existing directory, but
<VAR>src</VAR> is not.
<LI><CODE>EPERM</CODE>: the directory containing <VAR>src</VAR> and the task's
effective uid is not equal to the uid of the file or the directory
containing it, or the file system does not support renaming.
<LI><CODE>EXDEV</CODE>, <CODE>ENOTEMPTY</CODE>, <CODE>EMLINK</CODE>, <CODE>ENOTDIR</CODE>,
<CODE>EFAULT</CODE>, <CODE>EACCESS</CODE>, <CODE>ENAMETOOLONG</CODE>, <CODE>ENOENT</CODE>,
<CODE>ENOMEM</CODE>, <CODE>EROFS</CODE>, <CODE>ELOOP</CODE> or <CODE>ENOSPC</CODE>.
</UL>
<P>
<P>Go to the <A HREF="syscalls_26.html" tppabs="http://personal.xfol.com/%7erezaie/syscall/syscalls_26.html">previous</A>, <A HREF="syscalls_28.html" tppabs="http://personal.xfol.com/%7erezaie/syscall/syscalls_28.html">next</A> section.<P>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -