• <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>
  • access函數使用方法+例子

    發表于:2007-05-26來源:作者:點擊數: 標簽:
    access函數是的使用 #include int access (const char *pathname, int mode) mode 說明 R_OK 測試 讀許可權 W_OK 測試寫許可權 X_OK 測試執行許可權 F_OK 測試文件是否存在 1 #include 2 #include 3 #include 4 #include 5 6 7 main(int argc, char *argv[])

    aclearcase/" target="_blank" >ccess函數是的使用

    #include

    int access (const char *pathname, int mode)

    mode      說明

    R_OK      測試讀許可權

    W_OK     測試寫許可權

    X_OK      測試執行許可權

    F_OK       測試文件是否存在

          1 #include
          2 #include
          3 #include
          4 #include
          5
          6
          7 main(int argc, char *argv[])
          8 {
          9         if(argc != 2)
         10                 printf("usage: a.out \n");
         11         if(access(argv[1], R_OK) < 0)
         12                 printf("access error for %s\n", argv[1]);
         13         else
         14                 printf("read access OK\n");
         15         if(open(argv[1], O_RDONLY) < 0)
         16                 printf("open error for %s\n",argv[1]);
         17         else
         18                 printf("open for reading OK\n");
         19         exit(0);
         20 }

    原文轉自:http://www.kjueaiud.com

    評論列表(網友評論僅供網友表達個人看法,并不表明本站同意其觀點或證實其描述)
    老湿亚洲永久精品ww47香蕉图片_日韩欧美中文字幕北美法律_国产AV永久无码天堂影院_久久婷婷综合色丁香五月

  • <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>