Need to read the file modification/creation date & time of UDF file system

181 Views Asked by At

I have some DVDs with loads of pictures and I want to be able to get a list of file names, dates & times using C or C++ API calls.

Apparently the DVD is written using the UDF file system and even the Win 10 File Explorer does not show the date & time.

1) why does Win 10 not display the UDF times

2) what library or API calls will allow me to read that information

Running the latest Win 10 update & trying to use MSVC 2019

2

There are 2 best solutions below

0
On

the problem was in the DVD burner software which wrote invalid date & timestamps to the DVD, as well as Win 10 not complaining & identifying the issue.

1
On

I can answer your 2nd question though. If you want to get the filenames containing in the specific location, you need to use #include <filesystem>.

You may use the following code to achieve that:

#include <string>
#include <iostream>
#include <filesystem>

using namespace std;
namespace fs = filesystem;

int main(void) {
    string location = "folder";

    for (const auto & files : fs::directory_iterator(location))
        cout << files.path() << endl;

    return 0;
}