Re: [Vala] Get CREATION DATE OR TIME of file



Lametablemente no way? At least not directly using Vala , I understand
what I have read so far.
I keep looking for any option , since it was very important for me to
do in Vala and convince some people that language worth learning ...
I'll keep looking.
Mis proyectos de software libre en:
Github - edwinspire


2016-01-08 9:04 GMT-05:00 Luc Chante <luc chante gmail com>:
Hi,

You can test le file a attached to this mail.

This is what I get (under windows with msys2 and vala 0.30) :

$ ./test
** Message: test.vala:21: FileAttribute.TIME_CREATED =>
FileAttributeType.INVALID
** Message: test.vala:56: Can be read !!!
** Message: test.vala:60: FileAttribute.TIME_CREATED =>
FileAttributeStatus.UNSET

Even in C when you are looking for the creation date there is no simple
answer.

http://unix.stackexchange.com/questions/91197/how-to-find-creation-date-of-file#91200

Le jeu. 7 janv. 2016 à 15:27, Edwin De La Cruz <edwinspire gmail com> a
écrit :

Best regards . Attempt to get the date or time unix date of creation
of a file and do not get it , I used the following code :


        var directory = File.new_for_path (path);

var fi = directory.query_info ("*", GLib.FileQueryInfoFlags.NONE);

 stdout.printf ("Date %s \n", fi.get_attribute_as_string
(GLib.FileAttribute.TIME_CREATED));
 stdout.printf ("Date or time %s \n", fi.get_attribute_int64
(GLib.FileAttribute.TIME_MODIFIED).to_string());

I always returns 0 , maybe I'm not doing it correctly , be obliged his
help.

I'm using Windows valac - 0.26 .


Mis proyectos de software libre en:
Github - edwinspire
_______________________________________________
vala-list mailing list
vala-list gnome org
https://mail.gnome.org/mailman/listinfo/vala-list


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