function isFileExists(fileName, callback) {
        var store = cordova.file.dataDirectory;
        var filePath = store + fileName;
        window.resolveLocalFileSystemURL(filePath, success, fail);

        function success() {
            callback(filePath);
        }

        function fail() {
            callback(false);
        }
    }
/**
     *  check file exist in l
     *  @usage : attachmentService.isFileExists(fileName)
     **/
check file exist in l
@usage : attachmentService.isFileExists(fileName)
check file exist in l @usage : attachmentService . isFileExists ( fileName )
function isFileExists(fileName, callback) {
        var store = cordova.file.dataDirectory;
        var filePath = store + fileName;
        window.resolveLocalFileSystemURL(filePath, success, fail);
        function success() {
            callback(filePath);
        }
        function fail() {
            callback(false);
        }
    }
function isFileExists ( fileName , callback ) { var store = cordova . file . dataDirectory ; var filePath = store + fileName ; window . resolveLocalFileSystemURL ( filePath , success , fail ) ; function success ( ) { callback ( filePath ) ; } function fail ( ) { callback ( false ) ; } }
check file exist in l
  @usage : attachmentService.isFileExists(fileName)
check file exist in l @usage : attachmentService . isFileExists ( fileName )