Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 3

Qt-interest Archive, February 2007
retrieve file date and time stamp

Pages: Prev | 1 | 2 | Next

Message 16 in thread

Em Qui 08 Fev 2007, Ashish Singh escreveu:
> Hi,
>
> I want to retrieve the date and time stamp for files in a particular
> directory. How do I do it? Is there a class/function that will return these
> values in Qt?
>
> Thanks,
> Ashish

You can retrieve the timestamps using QFileInfo:

QFileInfo::created()
QFileInfo::lastRead()
QFileInfo::lastModified()

Use QDir::entryInfoList() in order to get files and subdirectories under a 
directory.

-- 
 [ signature omitted ] 

Message 17 in thread

Thanks guys!

On 2/10/07, Anderson Medeiros Gomes <amg1127@xxxxxxxxx> wrote:
>
> Em Qui 08 Fev 2007, Ashish Singh escreveu:
> > Hi,
> >
> > I want to retrieve the date and time stamp for files in a particular
> > directory. How do I do it? Is there a class/function that will return
> these
> > values in Qt?
> >
> > Thanks,
> > Ashish
>
> You can retrieve the timestamps using QFileInfo:
>
> QFileInfo::created()
> QFileInfo::lastRead()
> QFileInfo::lastModified()
>
> Use QDir::entryInfoList() in order to get files and subdirectories under a
> directory.
>
> --
> Anderson Medeiros Gomes
> amg1127@xxxxxxxxx
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
> "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
>
>