Skip to content
Not available in DartThis function is not part of the Dart package. The documentation below is for JavaScript and Python.

isFileHidden

Requires a Node.js runtime ('qsu/node')

Checks whether a file or folder in the specified path is a hidden file. Determines system hidden files for Windows and the presence or absence of a .(dot) for Linux and macOS or other operating systems.

If Windows fails to get the file properties, it assumes the file is not hidden.

Parameters

NameTypeRequiredDefault
filePathstringstr
isWindowsbooleanboolfalseFalse
Whether the target operating system to be checked is Windows

Returns

Promise<boolean>

bool

Examples

javascript
await isFileHidden('text.txt'); // false
await isFileHidden('.hiddenFile'); // true
await isFileHidden('.hiddenFile', true); // false (Files with no hidden attribute applied in Windows)
python
isFileHidden('text.txt') # False
isFileHidden('.hiddenFile') # True
isFileHidden('.hiddenFile', True) # False (Files with no hidden attribute applied in Windows)

Released under the MIT License