Giter Site home page Giter Site logo

Comments (6)

joshtynjala avatar joshtynjala commented on June 4, 2024 1

I made a pull request for hxcpp:

HaxeFoundation/hxcpp#1063

It's possible it won't be merged. If that's the case, we may need to expose a C++ function from Lime instead.

Neko and HashLink seem to use the same inaccurate value from the stat syscall. I tried building both runtimes on macOS, but the builds failed on my machine (I've successfully built HashLink on this machine in the past, but there seems to be an issue with the latest mbedtls library from Homebrew, and I can't see how to downgrade it to whatever the older version was).

from openfl.

joshtynjala avatar joshtynjala commented on June 4, 2024

It appears that Haxe's sys.FileSystem.stat() is returning the wrong value for FileStat.ctime on macOS.

Comparing it to what Finder reports, Haxe's creation time is the same as the "Last opened" time.

from openfl.

joshtynjala avatar joshtynjala commented on June 4, 2024

I've determined that the same behavior applies to Linux. Apparently, the POSIX standard did not historically require file systems to track a file's creation time at all, and the stat syscall used to get information about a file does not provide that information. It provides a few other timestamps, but those are different. At best, it provides a "status change time" which was historically recommended as the next best thing to creation time, but it appears that it is often not the same as the creation time.

macOS provides a stat64 syscall that includes more information, including the creation time. (EDIT: nope, deprecated) macOS extends the stat struct to add a st_birthtime field. I might be able to patch hxcpp to use this instead.

Newer Linux file systems store the creation time, but I had difficulty determining if there's an appropriate new syscall in Linux to use to get this information.

from openfl.

joshtynjala avatar joshtynjala commented on June 4, 2024

And I created an issue for HashLink: HaxeFoundation/hashlink#619

from openfl.

rat-moonshine avatar rat-moonshine commented on June 4, 2024

Was there any update on this @joshtynjala , is it yet available to any develop branch (?)

from openfl.

joshtynjala avatar joshtynjala commented on June 4, 2024

@rat-moonshine Nothing has been merged into our dependencies, so the behavior remains the same.

from openfl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.