function copyFileEntry(source, destination, options) {
        options = options || {};

        var deferred = new $.Deferred();

        // read the source file
        FileUtils.readAsText(source).done(function (text, modificationTime) {
            getRoot().done(function (nfs) {
                var offsets;

                // optionally parse offsets
                if (options.parseOffsets) {
                    var parseInfo = parseOffsetsFromText(text);
                    text = parseInfo.text;
                    offsets = parseInfo.offsets;
                }

                // create the new File
                createTextFile(destination, text, _getFileSystem()).done(function (entry) {
                    deferred.resolve(entry, offsets, text);
                }).fail(function (err) {
                    deferred.reject(err);
                });
            });
        }).fail(function (err) {
            deferred.reject(err);
        });

        return deferred.promise();
    }
Copy a file source path to a destination
@param {!File} source Entry for the source file to copy
@param {!string} destination Destination path to copy the source file
@param {?{parseOffsets:boolean}} options parseOffsets allows optional
    offset markup parsing. File is written to the destination path
    without offsets. Offset data is passed to the doneCallbacks of the
    promise.
@return {$.Promise} A promise resolved when the file is copied to the
    destination.