Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Check whether it is a plain file or directory.

Posted on 2000-03-01
4
210 Views
Last Modified: 2010-04-02

Hi, I am running gcc in solaris. In my home dir. i have several sub-directories. What i need to do is that based on an date given as an input by the user, i have to keep check the home directory and its sub-directories as well which are older than the given date. I dont' how to make it as a loop. please guide   me. hope you understand the question.

--gsbabu
0
Comment
Question by:gsbabu
  • 2
4 Comments
 
LVL 11

Expert Comment

by:alexo
ID: 2574405
Does your compiler support findfirst() and findnext() functions?
Check <io.h> for them.  If they exist, it is easy to write a recursive search.
0
 

Author Comment

by:gsbabu
ID: 2574440
Adjusted points to 40
0
 

Author Comment

by:gsbabu
ID: 2574441
No, My compiler dosen't support those functions, is there any other way to solve.

--gsbabu
0
 
LVL 84

Accepted Solution

by:
ozo earned 40 total points
ID: 2574451
man opendir, readdir
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question