Skip navigation.
 
mlRe: How to check if an File/Directory Exists?
FROM : Sherm Pendley
DATE : Tue Jan 01 23:25:06 2008

On Jan 1, 2008 4:53 PM, Aya Koshigaya <<email_removed>> wrote:

>
> I need to check if an File or Directory exists, but without the use of
> Cocoa or ObjC.. I need it in plain C.. is there a way to do this? :)



stat(). See "man 2 stat"

And, I need a way to create a directory.. also in plain C.


mkdir(). See "man 2 mkdir"


> PS: I need it in plain C, cause I have to use GCC 3.3.. and it seems
> like GCC3.3 can't compile ObjC.. I got many errors in the Cocoa.h :/



That's just plain wrong - GCC 3.3 is perfectly happy with Objective-C. Post
the errors you're seeing, and someone will probably be able to tell you what
the problem *really* is.

sherm--

Related mailsAuthorDate
mlHow to check if an File/Directory Exists? Aya Koshigaya Jan 1, 22:53
mlRe: How to check if an File/Directory Exists? Sherm Pendley Jan 1, 23:25
mlRe: How to check if an File/Directory Exists? Aya Koshigaya Jan 1, 23:49
mlRe: How to check if an File/Directory Exists? David Dunham Jan 2, 00:00
mlRe: How to check if an File/Directory Exists? Aya Koshigaya Jan 2, 00:02
mlRe: How to check if an File/Directory Exists? Sherm Pendley Jan 2, 00:20
mlRe: How to check if an File/Directory Exists? Sherm Pendley Jan 2, 00:28
mlRe: How to check if an File/Directory Exists? Aya Koshigaya Jan 2, 00:30
mlRe: How to check if an File/Directory Exists? Sherm Pendley Jan 2, 07:00