Processing a file after getting a path

15 views
Skip to first unread message

Ingwie Phoenix

unread,
Jul 7, 2014, 7:01:54 AM7/7/14
to fltkg...@googlegroups.com
Hey there.

I have a small problem… After creating an Fl_Native_File_Chooser and finally obtaining a file path, I need to get to know it’s last modified timestamp. On UNIX, one uses the stat functions. But what is on Win32? I am a bit lost there.

Does anyone have a suggestion?

Kind regards,
Ingwie.

nikego

unread,
Jul 7, 2014, 7:27:51 AM7/7/14
to fltkg...@googlegroups.com, ingwi...@googlemail.com

MacArthur, Ian (Selex ES, UK)

unread,
Jul 7, 2014, 7:41:55 AM7/7/14
to fltkg...@googlegroups.com
> I have a small problem... After creating an Fl_Native_File_Chooser and
> finally obtaining a file path, I need to get to know it's last modified
> timestamp. On UNIX, one uses the stat functions. But what is on Win32?
> I am a bit lost there.
>
> Does anyone have a suggestion?

Why not use stat?

Note that stat works on Win32 as well; they (more or less) support a set of posix API's that work the way you'd expect.


You might need to check how your compiler / headers handle that - internally MS call the function "_stat" so you might need to add an

#ifdef _WIN32
# ifndef stat
# define stat _stat
# endif
#endif // WIN32

or similar to make it compile; thereafter it pretty much Just Works.



Selex ES Ltd
Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 3EL
A company registered in England & Wales. Company no. 02426132
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************

Reply all
Reply to author
Forward
0 new messages