TELLATTR.C
资源名称:C.rar [点击查看]
上传用户:qq5388545
上传日期:2022-07-04
资源大小:29849k
文件大小:1k
源码类别:
界面编程
开发平台:
C/C++
- #include <stdio.h>
- #include <dos.h>
- #include <io.h>
- void main(int argc, char *argv[])
- {
- int attributes;
- if ((attributes = _chmod(argv[1], 0)) == -1)
- printf("Error accessing %sn", argv[1]);
- else
- {
- if (attributes & FA_ARCH)
- printf("Archive ");
- if (attributes & FA_DIREC)
- printf("Directory ");
- if (attributes & FA_HIDDEN)
- printf("Hidden ");
- if (attributes & FA_LABEL)
- printf("Volume label ");
- if (attributes & FA_RDONLY)
- printf("Readonly ");
- if (attributes & FA_SYSTEM)
- printf("System ");
- }
- }