I’m using FileSystem to establish if a file exists, but it’s not working.
This is my code:
.then(success =>console.log('success', success))
.catch(error => console.log('error', error))
but I keep getting the following error when I try to establish if the file exists.
error […/Exponent-2.6.4.app/client_override’ isn’t readable.]
Hi @kashifceler. The
FileSystem API is for files on the device, not source files. In addition, all your source files are bundled up into a single file when you publish, so I can’t think of a case where this would give you any useful information even if it was possible. Can you explain why you’re trying to do this?
Thanks for your reply. If the client_override directory exists I want to take the files from it and replace the default client directory files. In nodeJS I did this using the fs library - where I checked if the the directory existed, obviously fs can’t be used in react-native.
Ok, you won’t be able to use that same strategy but there are a bunch of approaches that would work. Still don’t understand exactly why you’re trying to do that. Seems like you could just replace the files in the
client directory instead of using an additional directory?
This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.