add directory study
This commit is contained in:
148
study/Ref-docs/POSIX/susv3/functions/fchdir.html
Normal file
148
study/Ref-docs/POSIX/susv3/functions/fchdir.html
Normal file
@@ -0,0 +1,148 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link type="text/css" rel="stylesheet" href="style.css"><!-- Generated by The Open Group's rhtm tool v1.2.1 -->
|
||||
<!-- Copyright (c) 2001 The Open Group, All Rights Reserved -->
|
||||
<title>fchdir</title>
|
||||
</head>
|
||||
<body bgcolor="white">
|
||||
<script type="text/javascript" language="JavaScript" src="../jscript/codes.js">
|
||||
</script>
|
||||
|
||||
<basefont size="3"> <a name="fchdir"></a> <a name="tag_03_137"></a><!-- fchdir -->
|
||||
<!--header start-->
|
||||
<center><font size="2">The Open Group Base Specifications Issue 6<br>
|
||||
IEEE Std 1003.1-2001<br>
|
||||
Copyright © 2001 The IEEE and The Open Group, All Rights reserved.</font></center>
|
||||
|
||||
<!--header end-->
|
||||
<hr size="2" noshade>
|
||||
<h4><a name="tag_03_137_01"></a>NAME</h4>
|
||||
|
||||
<blockquote>fchdir - change working directory</blockquote>
|
||||
|
||||
<h4><a name="tag_03_137_02"></a>SYNOPSIS</h4>
|
||||
|
||||
<blockquote class="synopsis">
|
||||
<div class="box"><code><tt><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt=
|
||||
"[Option Start]" border="0"> #include <<a href="../basedefs/unistd.h.html">unistd.h</a>><br>
|
||||
<br>
|
||||
int fchdir(int</tt> <i>fildes</i><tt>); <img src="../images/opt-end.gif" alt="[Option End]" border="0"></tt></code></div>
|
||||
|
||||
<tt><br>
|
||||
</tt></blockquote>
|
||||
|
||||
<h4><a name="tag_03_137_03"></a>DESCRIPTION</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>The <i>fchdir</i>() function shall be equivalent to <a href="../functions/chdir.html"><i>chdir</i>()</a> except that the
|
||||
directory that is to be the new current working directory is specified by the file descriptor <i>fildes</i>.</p>
|
||||
|
||||
<p>A conforming application can obtain a file descriptor for a file of type directory using <a href=
|
||||
"../functions/open.html"><i>open</i>()</a>, provided that the file status flags and access modes do not contain O_WRONLY or
|
||||
O_RDWR.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_03_137_04"></a>RETURN VALUE</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>Upon successful completion, <i>fchdir</i>() shall return 0. Otherwise, it shall return -1 and set <i>errno</i> to indicate the
|
||||
error. On failure the current working directory shall remain unchanged.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_03_137_05"></a>ERRORS</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>The <i>fchdir</i>() function shall fail if:</p>
|
||||
|
||||
<dl compact>
|
||||
<dt>[EACCES]</dt>
|
||||
|
||||
<dd>Search permission is denied for the directory referenced by <i>fildes</i>.</dd>
|
||||
|
||||
<dt>[EBADF]</dt>
|
||||
|
||||
<dd>The <i>fildes</i> argument is not an open file descriptor.</dd>
|
||||
|
||||
<dt>[ENOTDIR]</dt>
|
||||
|
||||
<dd>The open file descriptor <i>fildes</i> does not refer to a directory.</dd>
|
||||
</dl>
|
||||
|
||||
<p>The <i>fchdir</i>() may fail if:</p>
|
||||
|
||||
<dl compact>
|
||||
<dt>[EINTR]</dt>
|
||||
|
||||
<dd>A signal was caught during the execution of <i>fchdir</i>().</dd>
|
||||
|
||||
<dt>[EIO]</dt>
|
||||
|
||||
<dd>An I/O error occurred while reading from or writing to the file system.</dd>
|
||||
</dl>
|
||||
</blockquote>
|
||||
|
||||
<hr>
|
||||
<div class="box"><em>The following sections are informative.</em></div>
|
||||
|
||||
<h4><a name="tag_03_137_06"></a>EXAMPLES</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>None.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_03_137_07"></a>APPLICATION USAGE</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>None.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_03_137_08"></a>RATIONALE</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>None.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_03_137_09"></a>FUTURE DIRECTIONS</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>None.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_03_137_10"></a>SEE ALSO</h4>
|
||||
|
||||
<blockquote>
|
||||
<p><a href="chdir.html"><i>chdir</i>()</a> , the Base Definitions volume of IEEE Std 1003.1-2001, <a href=
|
||||
"../basedefs/unistd.h.html"><i><unistd.h></i></a></p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_03_137_11"></a>CHANGE HISTORY</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>First released in Issue 4, Version 2.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_03_137_12"></a>Issue 5</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>Moved from X/OPEN UNIX extension to BASE.</p>
|
||||
</blockquote>
|
||||
|
||||
<div class="box"><em>End of informative text.</em></div>
|
||||
|
||||
<hr>
|
||||
<hr size="2" noshade>
|
||||
<center><font size="2"><!--footer start-->
|
||||
UNIX ® is a registered Trademark of The Open Group.<br>
|
||||
POSIX ® is a registered Trademark of The IEEE.<br>
|
||||
[ <a href="../mindex.html">Main Index</a> | <a href="../basedefs/contents.html">XBD</a> | <a href=
|
||||
"../utilities/contents.html">XCU</a> | <a href="../functions/contents.html">XSH</a> | <a href="../xrat/contents.html">XRAT</a>
|
||||
]</font></center>
|
||||
|
||||
<!--footer end-->
|
||||
<hr size="2" noshade>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user