Getting error while using this.file.externalRootDirectory

#1

Hello all,

I am facing an issue while copying file form assets folder to externalRootDirectory. Its showing error like Not_Found. When i change externalRootDirectory to dataDirectory it is working fine.

/* ********************************************************* */
/*                   Below Code is working fine              */
/* ********************************************************* */

const path = this.file.applicationDirectory + 'www/assets/';
		this.file.copyFile(path, 'mypdf.pdf', this.file.dataDirectory, 'mypdf.pdf').then(
			(fileCopyResp: any) => {
				console.log(fileCopyResp);
			},
			err => {
				console.log('Error over file copy:::\n', err);
			}
		);
/* ********************************************************* */
/*                   Below Code is not working               */
/* ********************************************************* */

const path = this.file.applicationDirectory + 'www/assets/';
		this.file.copyFile(path, 'mypdf.pdf', this.file.externalRootDirectory, 'mypdf.pdf').then(
			(fileCopyResp: any) => {
				console.log(fileCopyResp);
			},
			err => {
				console.log('Error over file copy:::\n', err);
			}
		);