struct stat {
dev_t st_dev; /* ID of device containing file */
ino_t st_ino; /* inode number */
mode_t st_mode; /* protection */
nlink_t st_nlink; /* number of hard links */
uid_t st_uid; /
パスからディレクトリを数えようとしていますが、動作しません。だから、私はファイルとディレクトリの両方に番号を付けることは望ましくない、私はディレクトリだけを望む。私を手伝ってくれますか? コード: int listdir(char *dir) {
struct dirent *dp;
struct stat s;
DIR *fd;
int count = 0