[Vala] How to get date/time infos from a file ?



Hello,

I'm trying to get informations like TIME_ACCESS, TIME_CREATED, ... from a
file but I don't know how.

For example :
   var file = File.new_for_path ("some_file.txt");
   var file_info = file.query_info (FILE_ATTRIBUTE_STANDARD_NAME + "," +
FILE_ATTRIBUTE_STANDARD_TYPE, 0);
   int64 file_stamp =
file_info.get_attribute_int64(FileAttribute.TIME_ACCESS);

   stdout.printf ("%" + int64.FORMAT + "\n", file_stamp);

return :
0

Someone could help me ? :)

Thanks

Raum


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]