birdofpreyru / react-native-fs

File system access for React Native
https://dr.pogodin.studio/docs/react-native-file-system
Other
121 stars 8 forks source link

[Android] `readDirAssets()` does not recognize as directories directories with names starting with `_` / or perhaps Android just does not bundle assets with such names --- should double-check it #16

Closed birdofpreyru closed 8 months ago

birdofpreyru commented 8 months ago

See: https://github.com/birdofpreyru/react-native-static-server/issues/79#issuecomment-1770836921

the-unknown commented 8 months ago

Additionally, I found this: https://stackoverflow.com/questions/9206117/how-to-workaround-autoomitting-fiiles-folders-starting-with-underscore-in

Might be an Android thing.

the-unknown commented 8 months ago

In my case it works if I add this to the android{}-section of the build.gradle

android {
   //other code
    aaptOptions {
        ignoreAssetsPattern '!._'
    }

}
birdofpreyru commented 8 months ago

Ok, good to know, thus closing these issues as not a library fault.