Hello!
Well, I need an alternative to be able to delete files not accessed for more than 5 minutes.
I already know how to do this using the system programs, but wanted something done in C++ once, to avoid bottlenecks.
Is there any way to do this?

(if not understand, sorry, online translator)

Recommended Answers

All 2 Replies

deleting the files is simple -- just call remove() function. finding out which ones have not been accessed during the previous 5 minutes is more problematic. By "accessed" do you mean opened for reading, writing or either?

I wanted to make a simple cache using tmpfs, but as is too slow, I give up until I find a more efficient way.

But the idea was to get the access time of file, the last time it was read.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.