szwacz / fs-jetpack

Better file system API for Node.js
MIT License
777 stars 41 forks source link

In the function findAsync , property filter and absolutePath is unfriend #111

Closed AutismPatient closed 2 years ago

AutismPatient commented 2 years ago

image comparison image

AutismPatient commented 2 years ago

I need to implement the exclusion of files inside the hidden directory

szwacz commented 2 years ago

I'm sorry but I don't understand. You would need to describe the problem with more context and also I hope this is not a automatic translation issue :)

AutismPatient commented 2 years ago

Sorry, no hidden directory related parameter Settings are provided at this time

AutismPatient commented 2 years ago

Hidden directory files will not be culled

papb commented 2 years ago

Do you want to ignore hidden directories with findAsync?

By hidden, do you mean names starting with .?

AutismPatient commented 2 years ago

你想忽略隐藏目录findAsync吗?

隐藏,您是指以 开头的名称.吗?

Yes, I wish I could add an option Whether to skip the hidden directory

szwacz commented 2 years ago

On Windows there is no easy way to say if file is hidden in node.js, because Windows supports hidden files differently than unix-family operating systems. Here is some library that does this with extra native code: https://www.npmjs.com/package/is-hidden-file

On unix systems I believe this is as easy as check if the file name starts with . (dot).

AutismPatient commented 2 years ago

Thank you for your answer

I just want to filter out the hidden files during the retrieval phase

szwacz commented 2 years ago

Ah, ok, now it finally makes sense and it's fixable in the code.

szwacz commented 2 years ago

Freshly published version 5.1.0 outpust also absolutePath in filter function.