Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8c07bb4

Browse files
committed
listdir no longer returns . or ..; added remove==unlink
1 parent 71b1815 commit 8c07bb4

2 files changed

Lines changed: 18 additions & 6 deletions

File tree

Doc/lib/libposix.tex

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,9 @@ \section{Built-in Module \sectcode{posix}}
177177

178178
\begin{funcdesc}{listdir}{path}
179179
Return a list containing the names of the entries in the directory.
180-
The list is in arbitrary order. It includes the special entries
181-
\code{'.'} and \code{'..'} if they are present in the directory.
180+
The list is in arbitrary order. It does not include the special
181+
entries \code{'.'} and \code{'..'} even if they are present in the
182+
directory.
182183
\end{funcdesc}
183184

184185
\begin{funcdesc}{lseek}{fd\, pos\, how}
@@ -245,6 +246,10 @@ \section{Built-in Module \sectcode{posix}}
245246
\code{posix.error}.)
246247
\end{funcdesc}
247248

249+
\begin{funcdesc}{remove}{path}
250+
Remove the file \var{path}. See \code{rmdir} below to remove a directory.
251+
\end{funcdesc}
252+
248253
\begin{funcdesc}{rename}{src\, dst}
249254
Rename the file or directory \var{src} to \var{dst}.
250255
\end{funcdesc}
@@ -324,7 +329,8 @@ \section{Built-in Module \sectcode{posix}}
324329
\end{funcdesc}
325330

326331
\begin{funcdesc}{unlink}{path}
327-
Unlink \var{path}.
332+
Remove the file \var{path}. This is the same function as \code{remove};
333+
the \code{unlink} name is its traditional \UNIX{} name.
328334
\end{funcdesc}
329335

330336
\begin{funcdesc}{utime}{path\, \(atime\, mtime\)}

Doc/libposix.tex

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,9 @@ \section{Built-in Module \sectcode{posix}}
177177

178178
\begin{funcdesc}{listdir}{path}
179179
Return a list containing the names of the entries in the directory.
180-
The list is in arbitrary order. It includes the special entries
181-
\code{'.'} and \code{'..'} if they are present in the directory.
180+
The list is in arbitrary order. It does not include the special
181+
entries \code{'.'} and \code{'..'} even if they are present in the
182+
directory.
182183
\end{funcdesc}
183184

184185
\begin{funcdesc}{lseek}{fd\, pos\, how}
@@ -245,6 +246,10 @@ \section{Built-in Module \sectcode{posix}}
245246
\code{posix.error}.)
246247
\end{funcdesc}
247248

249+
\begin{funcdesc}{remove}{path}
250+
Remove the file \var{path}. See \code{rmdir} below to remove a directory.
251+
\end{funcdesc}
252+
248253
\begin{funcdesc}{rename}{src\, dst}
249254
Rename the file or directory \var{src} to \var{dst}.
250255
\end{funcdesc}
@@ -324,7 +329,8 @@ \section{Built-in Module \sectcode{posix}}
324329
\end{funcdesc}
325330

326331
\begin{funcdesc}{unlink}{path}
327-
Unlink \var{path}.
332+
Remove the file \var{path}. This is the same function as \code{remove};
333+
the \code{unlink} name is its traditional \UNIX{} name.
328334
\end{funcdesc}
329335

330336
\begin{funcdesc}{utime}{path\, \(atime\, mtime\)}

0 commit comments

Comments
 (0)