Bassman2 / MediaDevices

MTP Library
MIT License
99 stars 37 forks source link

Be able to get list of MediaFileInfo and MediaDirectoryInfo instead of path #135

Open preuss opened 2 months ago

preuss commented 2 months ago

Today you have two functions for files and directries: MediaDevice mediaDevice;

mediaDevice.EnumerateDirectories(string path) mediaDevice.GetDirectories(path);

mediaDevice.EnumerateFiles(string path) mediaDevice.GetFiles(path);

These returns IEnumerable strings of path in device. But if you need to get all the info from each file, we could just return the data right away. I would suggest two new functions for each type, that returns list of MediaFileInfo and MediaDirectoryInfo. The same as EnuerateDirectoryInfos and GetDirectoryInfos, EnumerateFileInfos and GetFileInfos.