CLOSEDIR

Section: Linux Programmer's Manual (3)
Updated: 2008-09-23
Index JM Home Page roff page
 

名前

closedir - ディレクトリをクローズする  

書式

#include <sys/types.h>

#include <dirent.h>

int closedir(DIR *dirp);
 

説明

closedir() 関数は dirp に関連付けられた ディレクトリストリームをクローズする。 closedir() の呼び出しが成功すると、 dirp に関連付けられたファイルディスクリプターもクローズされる。 ディレクトリストリームディスクリプター (directory stream descriptor) dirp は、 この呼び出しの後では使用することができない。  

返り値

closedir() 関数は成功時に 0 を返す。 エラーの場合は、-1 が返されて、 errno が適切に設定される。  

エラー

EBADF
ディレクトリストリームディスクリプター dirp が無効である。
 

準拠

SVr4, POSIX.1-2001, 4.3BSD.  

関連項目

close(2), opendir(3), readdir(3), rewinddir(3), scandir(3), seekdir(3), telldir(3)


 

Index

名前
書式
説明
返り値
エラー
準拠
関連項目

This document was created by man2html, using the manual pages.
Time: 03:26:39 GMT, April 25, 2010