React-native-fs: Copy files from app directory

Created on 7 Jun 2018  路  3Comments  路  Source: itinance/react-native-fs

i need to copy files at /data/data/app_name/databases/ to /data/data/app_name/files/ so sqlite package can open it..

i use the copyfile example on documentation with this paths

var sourcePath = "/data/data/app_name/databases/";
var destinPath = RNFS.DocumentDirectoryPath;

i triled with file://data.. i tried alot of things and always the same result, error, on one attempt i got a error saying that it was a Dir, beside it is always..it is invalid or does not exist..
Any help here?

Most helpful comment

I have created a native way to do that
move/copy dir

All 3 comments

It would be great if you guys can help us for cp or mv of directory either through code change on react-native-fs package or react-native-fetch-blob or some way to do through package. Do you think it would be better to do through native way

I have created a native way to do that
move/copy dir

awsome! i was about start looking into a way to do exacly that! Will take a look into that gist. Never used native in same time with React native

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nishanBende picture nishanBende  路  3Comments

opoze picture opoze  路  3Comments

zaheerahmad92001 picture zaheerahmad92001  路  3Comments

AbdelkaderOumrani picture AbdelkaderOumrani  路  3Comments

1556173267 picture 1556173267  路  3Comments