Godot: I want File.get_mtime(filename)

Created on 23 Jan 2017  Â·  2Comments  Â·  Source: godotengine/godot

Operating system or device - Godot version:
Linux

Issue description:

I need get a modify time of file. Like unix stat.st_mtime

Feature request
Need get a modify time of file.
Found File::get_modify_time() in Godot sources. It good. But need same in gdScript.

Want gd-function:

/**
* get_mtime(filename)
* @filename: String  Full path to file
* @return: int  File modification time. In seconds since 01.01.1970. 
*/
Int File.get_mtime(String filename)

Usage:

var mtime = File.get_mtime(filename)

It would be nice...

enhancement junior job gdscript

Most helpful comment

File.get_mtime is terrible for a name, consider File.get_modified_time instead. (just saying)

All 2 comments

Ah, this should be doable in 3.0 given variant's 64 bitness

On Mon, Jan 23, 2017 at 1:57 AM, vitalfadeev notifications@github.com
wrote:

Operating system or device - Godot version:
Linux

Issue description:

I need get a modify time of file. Like unix stat.st_mtime

Feature request
Need get a modify time of file.
Found File::get_modify_time() in Godot sources. It good. But need same in
gdScript.

Want gd-function:

/**

  • get_mtime(filename)
  • @filename: String Full path to file
  • @return: int File modification time. In seconds since 01.01.1970.
    */
    Int File.get_mtime(String filename)

Usage:

var mtime = File.get_mtime(filename)

It would be nice...

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/godotengine/godot/issues/7613, or mute the thread
https://github.com/notifications/unsubscribe-auth/AF-Z204pqtXgq4jc0t4xPp8kWk0x4QU6ks5rVDMmgaJpZM4Lqqb-
.

File.get_mtime is terrible for a name, consider File.get_modified_time instead. (just saying)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ndee85 picture ndee85  Â·  3Comments

testman42 picture testman42  Â·  3Comments

ducdetronquito picture ducdetronquito  Â·  3Comments

timoschwarzer picture timoschwarzer  Â·  3Comments

EdwardAngeles picture EdwardAngeles  Â·  3Comments