itinance / itinance/react-native-fs

Access Denied

Aperta
#1,237 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
C++
Stelle
5k
Fork
1k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

I have all permission. But still shows error.
Possible Unhandled Promise Rejection (id: 2):
Error: ENOENT: /storage/emulated/0/Download/DataBackup/prf.db: open failed: EACCES (Permission denied), open '/storage/emulated/0/Download/DataBackup/prf.db'

THIS IS MY CODE.

const onShare=()=>{

const full_path = RNFS.DownloadDirectoryPath + "/DataBackup/prf.db";
RNFS.exists(full_path)
.then((exist)=>{
if(exist){
RNFS.moveFile(full_path, RNFS.DownloadDirectoryPath+"/prf_new.db");
console.log("exist"+RNFS.DownloadDirectoryPath);
console.log(RNFS.DownloadDirectoryPath);

}else{

console.log("not exist");

}
}).catch((error)=>{
console.log(error);
})

}

N.B: when I run the create folder function, the is created successfully in Downlaod folder.
RNFS.exists(RNFS.DownloadDirectoryPath + "/DataBackup")
.then(exists => {
if (!exists) {
RNFS.mkdir(RNFS.DownloadDirectoryPath + "/DataBackup")
}}).catch(error => {
console.error("Error checking MEMBER directory existence:", error);
});

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.