当前位置: 首页 > news >正文

彩票网站制作找谁asp网站开发招聘

彩票网站制作找谁,asp网站开发招聘,公司画册模板,网站建设微信端NAMEstat 获取文件属性这个函数位于头文件里函数原型#xff1a;int stat(const char *path, struct stat *buf);參数#xff1a;path 文件路径文件名称buf 指向buffer的指针返回值#xff1a;-1 遇到错误0 成功返回函数作用#xff1a;把path文件的信息拷贝到指…NAMEstat 获取文件属性这个函数位于头文件里函数原型int stat(const char *path, struct stat *buf);參数path  文件路径文件名称buf     指向buffer的指针返回值-1   遇到错误0    成功返回函数作用把path文件的信息拷贝到指针buf所指的结构体中。描写叙述stat结构体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; /* user ID of owner */gid_t st_gid; /* group ID of owner */dev_t st_rdev; /* device ID (if special file) */off_t st_size; /* total size, in bytes */blksize_t st_blksize; /* blocksize for filesystem I/O */blkcnt_t st_blocks; /* number of 512B blocks allocated */time_t st_atime; /* time of last access */time_t st_mtime; /* time of last modification */time_t st_ctime; /* time of last status change */};dev_t包括设备文件的IDst_inoi结点st_mode文件类型和许可权限st_nline文件链接数st_uid用户全部者的IDst_gid所属组的IDst_rdev设备ID(假设指定文件)st_size 所占的字节数st_blksize文件系统I/O块大小st_block分配的512B大小的st_atime最后訪问时间st_mtime最后改动时间st_ctime状态最后改变时间以下的POSIX宏定义用于核对st_mode域的文件类型S_ISREG(m) 是常规文件?S_ISDIR(m) 文件夹?S_ISCHR(m) 字符设备?S_ISBLK(m) 块设备?S_ISFIFO(m) FIFO?S_ISLNK(m) 符号链接? (Not in POSIX.1-1996.)S_ISSOCK(m) 套接字? (Not in POSIX.1-1996.)以下的标志用于st_mode域S_IFMT 0170000 bit mask for the file type bit fieldsS_IFSOCK 0140000 socketS_IFLNK 0120000 symbolic linkS_IFREG 0100000 regular fileS_IFBLK 0060000 block deviceS_IFDIR 0040000 directoryS_IFCHR 0020000 character deviceS_IFIFO 0010000 FIFOS_ISUID 0004000 set-user-ID bitS_ISGID 0002000 set-group-ID bit (see below)S_ISVTX 0001000 sticky bit (see below)S_IRWXU 00700 mask for file owner permissionsS_IRUSR 00400 owner has read permissionS_IWUSR 00200 owner has write permissionS_IXUSR 00100 owner has execute permissionS_IRWXG 00070 mask for group permissionsS_IRGRP 00040 group has read permissionS_IWGRP 00020 group has write permissionS_IXGRP 00010 group has execute permissionS_IRWXO 00007 mask for permissions for others (not in group)S_IROTH 00004 others have read permissionS_IWOTH 00002 others have write permissionS_IXOTH 00001 others have execute permission实例#include #include #include #include #include int main(int argc, char *argv[]){struct stat info;if (argc ! 2){fprintf(stderr, Usage: %s , argv[0]);exit(EXIT_FAILURE);}if (stat(argv[1], info) -1){perror(stat);exit(EXIT_FAILURE);}printf(File type; );switch(info.st_mode S_IFMT){case S_IFBLK: printf(block device); break;case S_IFCHR: printf(character device); break;case S_IFDIR: printf(directory); break;case S_IFIFO: printf(FIFO pipe); break;case S_IFLNK: printf(symlink); break;case S_IFREG: printf(regular file); break;case S_IFSOCK: printf(socket); break;default: printf(unknown); break;}printf(I-node number: %ld, (long)info.st_ino);printf(Mode: %lo(octal),(unsigned long)info.st_mode);printf(Link count: %ld, (long)info.st_nlink);printf(Ownership: UID%ld GID%ld,(long)info.st_uid, (long)info.st_gid);printf(Preferred I/O block size: %ld bytes,(long) info.st_blksize);printf(File size: %lld bytes,(long long) info.st_size);printf(Blocks allocated: %lld,(long long) info.st_blocks);printf(Last status change: %s, ctime(info.st_ctime));printf(Last file access: %s, ctime(info.st_atime));printf(Last file modification: %s, ctime(info.st_mtime));exit(EXIT_SUCCESS);}执行结果liujlliujl-ThinkPad-Edge-E431:~/linux_program/list$ ./stat stat.cFile type; regular fileI-node number: 679622Mode: 100644(octal)Link count: 1Ownership: UID1000 GID1000Preferred I/O block size: 4096 bytesFile size: 2102 bytesBlocks allocated: 8Last status change: Wed Jul 16 23:26:20 2014Last file access: Wed Jul 16 23:26:35 2014Last file modification: Wed Jul 16 23:26:20 2014附录为/usr/include/sys/stat.h源代码/*-* Copyright (c) 1982, 1986, 1989 The Regents of the University of California.* All rights reserved.** Redistribution and use in source and binary forms, with or without* modification, are permitted provided that the following conditions* are met:* 1. Redistributions of source code must retain the above copyright* notice, this list of conditions and the following disclaimer.* 2. Redistributions in binary form must reproduce the above copyright* notice, this list of conditions and the following disclaimer in the* documentation and/or other materials provided with the distribution.* 3. All advertising materials mentioning features or use of this software* must display the following acknowledgement:*This product includes software developed by the University of*California, Berkeley and its contributors.* 4. Neither the name of the University nor the names of its contributors* may be used to endorse or promote products derived from this software* without specific prior written permission.** THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS AS IS AND* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF* SUCH DAMAGE.**(#)stat.h7.11 (Berkeley) 3/3/91*/struct stat{dev_tst_dev;/* inodes device */ino_tst_ino;/* inodes number */mode_tst_mode;/* inode protection mode */nlink_tst_nlink;/* number of hard links */uid_tst_uid;/* user ID of the files owner */gid_tst_gid;/* group ID of the files group */dev_tst_rdev;/* device type */off_tst_size;/* file size, in bytes */time_tst_atime;/* time of last access */longst_spare1;time_tst_mtime;/* time of last data modification */longst_spare2;time_tst_ctime;/* time of last file status change */longst_spare3;longst_blksize;/* optimal blocksize for I/O */longst_blocks;/* blocks allocated for file */u_longst_flags;/* user defined flags for file */u_longst_gen;/* file generation number */};#defineS_ISUID0004000/* set user id on execution */#defineS_ISGID0002000/* set group id on execution */#ifndef _POSIX_SOURCE#defineS_ISTXT0001000/* sticky bit */#endif#defineS_IRWXU0000700/* RWX mask for owner */#defineS_IRUSR0000400/* R for owner */#defineS_IWUSR0000200/* W for owner */#defineS_IXUSR0000100/* X for owner */#ifndef _POSIX_SOURCE#defineS_IREADS_IRUSR#defineS_IWRITES_IWUSR#defineS_IEXECS_IXUSR#endif#defineS_IRWXG0000070/* RWX mask for group */#defineS_IRGRP0000040/* R for group */#defineS_IWGRP0000020/* W for group */#defineS_IXGRP0000010/* X for group */#defineS_IRWXO0000007/* RWX mask for other */#defineS_IROTH0000004/* R for other */#defineS_IWOTH0000002/* W for other */#defineS_IXOTH0000001/* X for other */#ifndef _POSIX_SOURCE#defineS_IFMT 0170000/* type of file */#defineS_IFIFO 0010000/* named pipe (fifo) */#defineS_IFCHR 0020000/* character special */#defineS_IFDIR 0040000/* directory */#defineS_IFBLK 0060000/* block special */#defineS_IFREG 0100000/* regular */#defineS_IFLNK 0120000/* symbolic link */#defineS_IFSOCK 0140000/* socket */#defineS_ISVTX 0001000/* save swapped text even after use */#define S_BLKSIZE512/* block size used in the stat struct *//* 0666 */#defineDEFFILEMODE(S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)#endif#defineS_ISDIR(m)((m 0170000) 0040000)/* directory */#defineS_ISCHR(m)((m 0170000) 0020000)/* char special */#defineS_ISBLK(m)((m 0170000) 0060000)/* block special */#defineS_ISREG(m)((m 0170000) 0100000)/* regular file */#defineS_ISFIFO(m)((m 0170000) 0010000)/* fifo */#ifndef _POSIX_SOURCE#defineS_ISLNK(m)((m 0170000) 0120000)/* symbolic link */#defineS_ISSOCK(m)((m 0170000) 0140000)/* socket */#endif#ifndef KERNEL#include __BEGIN_DECLSmode_tumask __P((mode_t));intchmod __P((const char *, mode_t));intfstat __P((int, struct stat *));intmkdir __P((const char *, mode_t));intmkfifo __P((const char *, mode_t));intstat __P((const char *, struct stat *));#ifndef _POSIX_SOURCEintfchmod __P((int, mode_t));intlstat __P((const char *, struct stat *));#endif /* not POSIX */__END_DECLS#endif
http://wiki.neutronadmin.com/news/60387/

相关文章:

  • 电子商务网站建设客户需求调查表网站建设礼品
  • 网站开发安全问题申请免费网站公司
  • 网站做一个多少钱旅游景区网络推广方案
  • 织梦系统网站首页upcache=1有专门做电商网站的CMS吗
  • 网站开发的数据库技术程序员做个网站要多少钱呢
  • 网站开发公司网站导航设置
  • 如何做网站seo诊断种子搜索器
  • 兰考网站建设做电商网站公司简介
  • 陕西建新建设有限公司网站搜索引擎营销特点
  • 建设工程规划许可证查询网站黄冈网络推广服务平台
  • 有了域名就可以做网站了吗个人网站主办者名称
  • 网站导航设计模板wordpress 随机显示文章
  • 东莞石排网站建设html5购物网站模板
  • wap php网站源码网页设计导航栏尺寸
  • 肇庆建设网站2345官方网站
  • dw网站建设浙江省建设职业技术学院网站
  • 山东三强建设咨询有限公司网站南京比较有名的广告公司
  • 制作网站404页面网站建设需要的材料
  • 网站后台怎么添加图片销售管理软件crm
  • 大型公司为什么做网站wordpress图文插件
  • 衡阳市住房和城乡建设局官方网站企业整合营销
  • 域名备案和网站备案有什么区别推广普通话手抄报简单
  • 中医网站开发西安建设工程信息网的地址
  • 天津建设招标网站seo搜索引擎优化视频
  • 济南建网站最好的赤峰网站开发
  • 戴尔网站建设规划个人主页网站模板免费
  • 优化一个网站需要多少钱江西省赣州
  • 平面设计网站模板大连旧房翻新装修哪家公司好
  • 电子商务网站建设的具体内容平面设计素材网站哪个好
  • 合肥网站优化步骤网站建设淘宝客模板下载