stevenvachon / hidefile

Hide files and directories on all platforms.
MIT License
29 stars 1 forks source link

Method isHidden or isHiddenAsync returns false for all files on Windows #2

Closed adimkov closed 7 years ago

adimkov commented 7 years ago

Hi!

I looked for such library and it was disappointment for me that this method, that i was looking for, does not work :(.

I take a look into code and found this condition that does not work for Windows: data.unix===true && ((data.windows===true && windows===true) || windows===false); even if data.windows is true and windows true either - data.unix is false.

stevenvachon commented 7 years ago

This library is intended to create an isomorphic interface for hiding files on both Unix and Windows. To quote the documentation:

Unix: result is true if prefixed.
Windows: result is true if prefixed and has "hidden" attribute, false if only prefixed.

If all you need is a means of detecting the hidden attribute, check out this library's dependency: winattr.