Listing files in cpp Windows not working?

Having issues reading files from a directory.
I have a working path.
When I check if it’s a directory:

trace(sys.FileSystem.isDirectory(image_dir));

It says true!

When we read file names:

trace(sys.FileSystem.readDirectory(image_dir));

It returns an array of many empty strings. There are as many empty strings as there are actual files.

looks like this:

[,,,,,,,,,,,,,,,,,,,,]

Suggestions?

Okay, I managed to do it like this:

	var data:Bytes = (File.getBytes("c:/my_storage/a.jpeg"));
	addChild(new Bitmap(BitmapData.fromBytes(data)));

I think the main issue was that I wasn’t programming for years and I’m rusty and it was probably just a type in the file path and not a real issue.

Now I am having trouble reading files from a directory.
I have a working path.
When I check if it’s a directory:

trace(sys.FileSystem.isDirectory(image_dir));

It says true!

When read file names:

trace(sys.FileSystem.readDirectory(image_dir));

I get an array of many empty strings. It seems there are as many empty strings as there are actual files.

looks like this:

[,,,,,,,,,,,,,,,,,,,,]

Can you try playing with adding/removing a trailing slash to the path?

Hi, I figured it out.
The issue was that by default you get hxcpp: [4.0.19] and haxe 3.4.4. They don’t play well together so I had to downgrade to version hxcpp [3.4.188].
Yes, OpenFL is awesome again like always! It was just an incompatibility between the default versions during the time I installed haxe.

Thank you!