Is your feature request related to a problem? Please describe.
I found out that using the withFileTypes: true option on fs.readdirSync could return information of whether a file is a directory using the dirent.isDirectory() property, but there's no option to check whether a file is a hidden file. I googled and found out that I can check if a file is hidden in Unix simply by a file name pattern, but, not in windows. As a result, I have to code using c++ and make my own version of fs and call it via child_process, which just makes the program laggy and slower (needs about 100-200ms to load information of a directory whereas fs.readdirSync needs about 10-20ms to read a directory).
Describe the solution you'd like
Fs could provide an isHiddenFile or isHidden or whatever property that just gives information of whether a file/folder is hidden in the system.
Additional Information
For whoever needs a way to filter hidden file, you can do this by using FILE_ATTRIBUTE_HIDDEN of GetFileAttributesA using c++ for the windows, or just by using this /(^|\/)\.[^\/\.]/ regex to implement it for UNIX-like operating system.
Is your feature request related to a problem? Please describe.
I found out that using the
withFileTypes: trueoption onfs.readdirSynccould return information of whether a file is a directory using thedirent.isDirectory()property, but there's no option to check whether a file is a hidden file. I googled and found out that I can check if a file is hidden in Unix simply by a file name pattern, but, not in windows. As a result, I have to code using c++ and make my own version offsand call it viachild_process, which just makes the program laggy and slower (needs about 100-200ms to load information of a directory whereasfs.readdirSyncneeds about 10-20ms to read a directory).Describe the solution you'd like
Fs could provide an
isHiddenFileorisHiddenor whatever property that just gives information of whether a file/folder is hidden in the system.Additional Information
For whoever needs a way to filter hidden file, you can do this by using
FILE_ATTRIBUTE_HIDDENofGetFileAttributesAusing c++ for the windows, or just by using this/(^|\/)\.[^\/\.]/regex to implement it for UNIX-like operating system.