随笔分类 -  关于嵌入式

摘要:1、查看目录信息 opendir readdir stat,lstat,fstat 将目录按字母排序,alphasort,scandir 一般的用法是将alphasort作为scandir的参数,比如struct dirent **namelist; scandir("/",&namelist,0,alphasort);2、复习了一遍popen,pclose3、明天继续,仔细研究下alphasort函数 阅读全文
posted @ 2013-04-25 21:04 stephen@liu 阅读(105) 评论(0) 推荐(0)
摘要:1、long ftell(FILE *stream)函数,一般用来得到文件大小,比如你可以这样用 fseek(fp, 0, SEEK_END); //跳到文件结尾 size = ftell(fp)+1; 先跳到文件流结尾,然后得到文件流当前位置 偏移文件首的位置是多少2、linux里面的限制,比如路径名最大能有多少个字符串,测试一些linux下面的极限值(其他系统不同,比如BSD,) long sysconf(int name); long pathconf(const char *pathname,int name); long fpathconf(int filed... 阅读全文
posted @ 2013-04-25 16:20 stephen@liu 阅读(134) 评论(0) 推荐(0)