VC++에서는
CFileFind을 이용해서 파일을 찾습니다.
그런데, Unix, Linux에서는 어떤 방법을 써야 하는지 잘 모르겠더군요.
fullpath를 입력해서 그 파일이 있으면 TRUE, 없으면 FALSE가 Return되면 됩니다.
그럼. 답변 기다리겠습니다.' ^^
$ man 2 open
<어떠한 역경에도 굴하지 않는 '하양 지훈'>
#include <com.h> <C2H5OH.h> <woman.h> do { if (com) hacking(); if (money) drinking(); if (women) loving(); } while (1);
$ man 2 access ACCESS(2) Linux Programmer’s Manual ACCESS(2) NAME access - check user’s permissions for a file SYNOPSIS #include <unistd.h> int access(const char *pathname, int mode); ....
ACCESS(2) Linux Programmer’s Manual ACCESS(2)
NAME access - check user’s permissions for a file
SYNOPSIS #include <unistd.h>
int access(const char *pathname, int mode); ....
#define TRUE 1 #define FALSE 0 int CFileFind( char * path) { int ret; ret = access( path, F_OK); if ( ret == 0 ) { return TRUE; } else { return FALSE; } }
텍스트 포맷에 대한 자세한 정보
<code>
<blockcode>
<apache>
<applescript>
<autoconf>
<awk>
<bash>
<c>
<cpp>
<css>
<diff>
<drupal5>
<drupal6>
<gdb>
<html>
<html5>
<java>
<javascript>
<ldif>
<lua>
<make>
<mysql>
<perl>
<perl6>
<php>
<pgsql>
<proftpd>
<python>
<reg>
<spec>
<ruby>
<foo>
[foo]
[code:1]$ man 2 open[/code:1] <어떠
$ man 2 open
<어떠한 역경에도 굴하지 않는 '하양 지훈'>
#include <com.h> <C2H5OH.h> <woman.h>
do { if (com) hacking(); if (money) drinking(); if (women) loving(); } while (1);
[quote]$ man 2 accessACCESS(2)
[code:1]#define TRUE 1#define FALSE 0
댓글 달기