I want to display the files in created directory. The files may be any format like audio, video, image etc. This is How I able to create a directory and remove directory. Home.ts
createDirectory(){
this.file.createDir(this.file.externalRootDirectory, "DirectoryFile", false )
.then((directoryEntry) =>{
alert("directory created"+ directoryEntry.fullPath);
}
).catch((error)=>{
alert(JSON.stringify(error));
})
}
removeDirectory(){
this.file.removeDir(this.file.externalRootDirectory, "DirectoryFile")
.then((resultData) =>{
if(resultData.success){
alert("directory removed" + resultData);
}
})
.catch((err) =>{
alert(JSON.stringify(err));
})
enter code here
You can use listDir