| Computing.Net: Over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to sign up now, it's free! |
checking a file exist or not
|
Original Message
|
Name: mike
Date: July 26, 2002 at 14:23:39 Pacific
Subject: checking a file exist or not |
Comment: i want to check if a file is exists in a directory or not during runtime in my C++ programme i wrote on solaris any one knows how that check can be done for unix ? in c++
Report Offensive Message For Removal
|
|
Response Number 1
|
Name: Tom
Date: July 26, 2002 at 21:08:15 Pacific
|
Reply: (edit)Just open the file, using ios::nocreate, and if it fails, the file doesn't exist. If it doesn't fail, you can just close the file.
Report Offensive Follow Up For Removal
|

Post Locked
This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
Go to Programming Forum Home