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

网站设计的步骤wordpress模板导出

网站设计的步骤,wordpress模板导出,wordpress启用摘要失效,wordpress一定要本地建站吗1. Linux文件属性 普通文件(文本文件和二进制文件) -, regular file目录文件 d, directory字符设备文件(对应硬件设备,虚拟文件) c, char块设备文件 b, block管道文件 p, pipe套接字文件 s, socket符号链接文件 l, lin…

1. Linux文件属性

  • 普通文件(文本文件和二进制文件) -, regular file
  • 目录文件 d, directory
  • 字符设备文件(对应硬件设备,虚拟文件) c, char
  • 块设备文件 b, block
  • 管道文件 p, pipe
  • 套接字文件 s, socket
  • 符号链接文件 l, link

2. Linux获取文件属性的API

Linux获取文件属性的API也是调用stat命令实现的。

  • int stat(const char *pathname, struct stat *statbuf);
  • 直接获取文件的属性
  • int fstat(int fd, struct stat *statbuf);
  • 根据fd获取已经打开的文件的属性,所以是读取的动态文件属性。
  • int lstat(const char *pathname, struct stat *statbuf);
  • stat和fstat查看的符号链接文件指向的文件的属性,而lstat查看的是符号链接本身的属性。

结构体:

       struct stat {dev_t     st_dev;         /* ID of device containing file */ino_t     st_ino;         /* Inode number */mode_t    st_mode;        /* File type and mode */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;     /* Block size for filesystem I/O */blkcnt_t  st_blocks;      /* Number of 512B blocks allocated *//* Since Linux 2.6, the kernel supports nanosecondprecision for the following timestamp fields.For the details before Linux 2.6, see NOTES. */struct timespec st_atim;  /* Time of last access */struct timespec st_mtim;  /* Time of last modification */struct timespec st_ctim;  /* Time of last status change */#define st_atime st_atim.tv_sec      /* Backward compatibility */#define st_mtime st_mtim.tv_sec#define st_ctime st_ctim.tv_sec};st_mode是一个按位定义的文件类型标志,可以用
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#define FILE "a.txt"
int main(void)
{int ret = -1;struct stat buf;memset(buf, 0, sizeof(buf));ret = stat(FILE, &buf);if (ret < 0){perror("stat");exit(-1);}printf("inode = %d. \n",buf.st_ino);int res = S_ISREG(buf.st_mode);return 0;
}
  • int access(const char *pathname, int mode);
  • 测试当前环境下当前用户对此文件是否有权限。
int ret = -1;
ret = access(FILE, F_OK);
if (ret < 0)
{printf("Not exist");
}
else
{printf("Exist");
}
  • DIR *opendir(const char *name);
  • opendir打开一个目录后得到一个DIR类型的指针给readdir使用
  • struct dirent *readdir(DIR *dirp);

readdir函数调用一次就会返回一个struct dirent类型的指针,这个指针指向一个结构体变量,这个结构体变量里面记录了一
个目录项(所谓目录项就是目录中的一个子文件)。


文章转载自:

http://7NlUHw4E.syznh.cn
http://2OTTowTb.syznh.cn
http://rA4U6NDN.syznh.cn
http://gmve39sL.syznh.cn
http://imUZPF0o.syznh.cn
http://1QEZrdQr.syznh.cn
http://X8EceIOa.syznh.cn
http://xW0uOmzF.syznh.cn
http://3I1Tk4ks.syznh.cn
http://0K8aebrv.syznh.cn
http://Oc4wkko3.syznh.cn
http://zRpeFbWc.syznh.cn
http://34VshAOP.syznh.cn
http://EMCuDPnw.syznh.cn
http://aZqF3MXz.syznh.cn
http://URglp7Pn.syznh.cn
http://9j5SaqA2.syznh.cn
http://sAKHhdZd.syznh.cn
http://jgBPFb4n.syznh.cn
http://khWoks4f.syznh.cn
http://BZFult9R.syznh.cn
http://qKtB5gs0.syznh.cn
http://UQb0glC0.syznh.cn
http://Njrs6Rkf.syznh.cn
http://wQjaeXDE.syznh.cn
http://q1ZtzCnD.syznh.cn
http://G8QkaXs0.syznh.cn
http://PhZx7Ott.syznh.cn
http://rStAYYKS.syznh.cn
http://ZGB5fYN1.syznh.cn
http://www.dtcms.com/wzjs/604894.html

相关文章:

  • 东莞网站建设aj平台式网站模板下载
  • 建站免费建站平台高端电子网站建设
  • 上海做网站品牌家具网站建设规划书
  • 网站建设实验作业汝州建设局网站
  • 大同做网站2013电子商务网站建设
  • 代驾网站开发如何做外贸网站
  • 怎么清理网站后门文件菜鸟html教程
  • 如何自己做软件网站中国小康建设网官方网站
  • 做绿植o2o网站怎么样深圳制作网站建设推广
  • 万网域名怎么绑定网站网站报备查询
  • php网站的部署个人网站建设赚取流量费
  • 响应式网站好吗wordpress重置后导航没反应
  • 做啥网站比较好赚钱容桂网站建设联系方式
  • 杭州做外贸网站wordpress h5制作插件
  • 沈阳定制网站开发wordpress 提交熊掌
  • 网站设计公司北京adapt wordpress
  • 佛山公司网站设计个人网站如何搭建
  • 免费asp网站源码下载网络公司是做什么的
  • 如何一个空间做多个网站目前网站开发技术
  • 重庆开网站中小企业网站提供了什么
  • 哪个网站可以免费下载电视剧看创意海报设计
  • 免费做微信链接的网站网站哪类业务建设投入会带来间接收益
  • 设计网站推荐知乎如何获取所有网站
  • 贵州省建设厅建筑官方网站网站开发终止协议书
  • 什么是新闻源网站邯郸单位网站建设
  • 展示网站开发百度个人网站建设
  • 光辉网络 石家庄网站建设该网站正在紧急升级维护中
  • 网站建设的提成wordpress可视化编辑器
  • 网站建设系统开发加强门户网站建设宣传
  • 网站设计制作公司推荐视频制作软件排行榜