src/filesystem/impls/appshell/AppshellFileSystem.js
function _mapError(err) {
        if (!err) {
            return null;
        }

        switch (err) {
        case appshell.fs.ERR_INVALID_PARAMS:
            return FileSystemError.INVALID_PARAMS;
        case appshell.fs.ERR_NOT_FOUND:
            return FileSystemError.NOT_FOUND;
        case appshell.fs.ERR_CANT_READ:
            return FileSystemError.NOT_READABLE;
        case appshell.fs.ERR_CANT_WRITE:
            return FileSystemError.NOT_WRITABLE;
        case appshell.fs.ERR_UNSUPPORTED_ENCODING:
            return FileSystemError.UNSUPPORTED_ENCODING;
        case appshell.fs.ERR_OUT_OF_SPACE:
            return FileSystemError.OUT_OF_SPACE;
        case appshell.fs.ERR_FILE_EXISTS:
            return FileSystemError.ALREADY_EXISTS;
        case appshell.fs.ERR_ENCODE_FILE_FAILED:
            return FileSystemError.ENCODE_FILE_FAILED;
        case appshell.fs.ERR_DECODE_FILE_FAILED:
            return FileSystemError.DECODE_FILE_FAILED;
        case appshell.fs.ERR_UNSUPPORTED_UTF16_ENCODING:
            return FileSystemError.UNSUPPORTED_UTF16_ENCODING;
        }
        return FileSystemError.UNKNOWN;
    }
function _mapError(err) {
        if (!err) {
            return null;
        }

        switch (err) {
        case appshell.fs.ERR_INVALID_PARAMS:
            return FileSystemError.INVALID_PARAMS;
        case appshell.fs.ERR_NOT_FOUND:
            return FileSystemError.NOT_FOUND;
        case appshell.fs.ERR_CANT_READ:
            return FileSystemError.NOT_READABLE;
        case appshell.fs.ERR_CANT_WRITE:
            return FileSystemError.NOT_WRITABLE;
        case appshell.fs.ERR_UNSUPPORTED_ENCODING:
            return FileSystemError.UNSUPPORTED_ENCODING;
        case appshell.fs.ERR_OUT_OF_SPACE:
            return FileSystemError.OUT_OF_SPACE;
        case appshell.fs.ERR_FILE_EXISTS:
            return FileSystemError.ALREADY_EXISTS;
        case appshell.fs.ERR_ENCODE_FILE_FAILED:
            return FileSystemError.ENCODE_FILE_FAILED;
        case appshell.fs.ERR_DECODE_FILE_FAILED:
            return FileSystemError.DECODE_FILE_FAILED;
        case appshell.fs.ERR_UNSUPPORTED_UTF16_ENCODING:
            return FileSystemError.UNSUPPORTED_UTF16_ENCODING;
        }
        return FileSystemError.UNKNOWN;
    }
function _mapError ( err ) { if ( ! err ) { return null ; } switch ( err ) { case appshell . fs . ERR_INVALID_PARAMS : return FileSystemError . INVALID_PARAMS ; case appshell . fs . ERR_NOT_FOUND : return FileSystemError . NOT_FOUND ; case appshell . fs . ERR_CANT_READ : return FileSystemError . NOT_READABLE ; case appshell . fs . ERR_CANT_WRITE : return FileSystemError . NOT_WRITABLE ; case appshell . fs . ERR_UNSUPPORTED_ENCODING : return FileSystemError . UNSUPPORTED_ENCODING ; case appshell . fs . ERR_OUT_OF_SPACE : return FileSystemError . OUT_OF_SPACE ; case appshell . fs . ERR_FILE_EXISTS : return FileSystemError . ALREADY_EXISTS ; case appshell . fs . ERR_ENCODE_FILE_FAILED : return FileSystemError . ENCODE_FILE_FAILED ; case appshell . fs . ERR_DECODE_FILE_FAILED : return FileSystemError . DECODE_FILE_FAILED ; case appshell . fs . ERR_UNSUPPORTED_UTF16_ENCODING : return FileSystemError . UNSUPPORTED_UTF16_ENCODING ; } return FileSystemError . UNKNOWN ; }
Convert appshell error codes to FileSystemError values.

@param {?number} err An appshell error code
@return {?string} A FileSystemError string, or null if there was no error code.
@private
Convert appshell error codes to FileSystemError values .