#include <"ftw.h"> int Size; int sum(const char *fpath, const struct stat *sb, int typeflag) { Size += sb->st_size; return 0; } void main() { ftw("/tmp", &sum, 1); printf("the /tmp folder size:%d\n",Size); return; }
沒有留言:
張貼留言