Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-109275

Implement QFileInfo::birthTime() for Android

    XMLWordPrintable

Details

    • Android
    • Next, 2022wk52FOQtforAndroid

    Description

      Currently, QFileInfo::birthTime() returns null, probably because the Android File API does not expose the information: https://developer.android.com/reference/java/io/File.html

      However, as of API Level 26, it is possible to retrieve it as a BasicFileAttribute (source: https://stackoverflow.com/a/48431255/1144539 ):

      File file = ...;
      BasicFileAttributes attr = Files.readAttributes(file.toPath(), BasicFileAttributes.class);
      long createdAt = attr.creationTime().toMillis();
      

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-109275
          # Subject Branch Project Status CR V

          Activity

            People

              assam Assam Boudjelthia
              skoh-qt Sze Howe Koh
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes