Wishlist: t = GetDirectoryAsTable(path)
Posted: Thu Feb 13, 2025 1:00 pm
I just noticed there is no way to read Directory in such a way that it would return a table of all the files.
Main point here being consistency with DropFile option. As if I drop more than one file to a window, it will give me a table containing every files path and type.
Based upon this I made a system where it adds all those files to my window when dropfiled, but problem is now that I also planned that if there is folder, that it would also add all the contents of the folders and subfolders, and I meant to simply have AddFilesToDirectory(Dir, T_Files), and then I meant that if it encounters a directory, it would simply call itself again, as in, recursive function.
However, since DropFiles and all Directory accessing functions have different logic into them, now I either have to make two different functions, or I have to prepare the directory myself to make it into similar table as Dropfile does.
Main point here being consistency with DropFile option. As if I drop more than one file to a window, it will give me a table containing every files path and type.
Based upon this I made a system where it adds all those files to my window when dropfiled, but problem is now that I also planned that if there is folder, that it would also add all the contents of the folders and subfolders, and I meant to simply have AddFilesToDirectory(Dir, T_Files), and then I meant that if it encounters a directory, it would simply call itself again, as in, recursive function.
However, since DropFiles and all Directory accessing functions have different logic into them, now I either have to make two different functions, or I have to prepare the directory myself to make it into similar table as Dropfile does.