Article View: borland.public.cppbuilder.nativeapi
Article #16554Re: How to conclude a file or directory exists
From: JD
Date: Wed, 07 May 2003 01:16
Date: Wed, 07 May 2003 01:16
16 lines
1385 bytes
1385 bytes
"Sky" <akeehuang@163.net> wrote:
> [...] a file or directory is existed or not? not use VCL,
Use access:
access: determines accessibility of a file
int access(const char *filename, int amode);
amode = 0 checks for file existence
amode = 2 checks for write permission
If the requested access is allowed, 0 is returned; otherwise, a
value of -1 is returned and errno is set.
~ JD
Technical Details
Message-ID:
<3eb85e7b$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!216.166.71.14.MISMATCH!border3.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<3eb7a237@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,753d602e8f21d00d X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-05-06 18:24:21 PST From: "JD" <nospam@nospam.com> Sender: "JD" <nospam@nospam.com> Reply-To: "JD" <nospam@nospam.com> Subject: Re: How to conclude a file or directory exists Newsgroups: borland.public.cppbuilder.nativeapi X-User-Info: 172.140.14.149 172.140.14.149 References: <3eb7a237@newsgroups.borland.com> NNTP-Posting-Host: 207.105.83.65 Message-ID: <3eb85e7b$1@newsgroups.borland.com> Date: 6 May 2003 18:16:43 -0700 X-Trace: newsgroups.borland.com 1052270203 207.105.83.65 (6 May 2003 18:16:43 -0700) Lines: 17 Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!216.166.71.14.MISMATCH!border3.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail