function fileToOutput(output, filePath) {
    var book = output.getBook();
    var readme = book.getReadme();
    var fileReadme = readme.getFile();

    if (
        path.basename(filePath, path.extname(filePath)) == 'README' ||
        (fileReadme.exists() && filePath == fileReadme.getPath())
    ) {
        filePath = path.join(path.dirname(filePath), 'index' + OUTPUT_EXTENSION);
    } else {
        filePath = PathUtils.setExtension(filePath, OUTPUT_EXTENSION);
    }

    return LocationUtils.normalize(filePath);
}
function fileToOutput(output, filePath) {
    var book = output.getBook();
    var readme = book.getReadme();
    var fileReadme = readme.getFile();

    if (
        path.basename(filePath, path.extname(filePath)) == 'README' ||
        (fileReadme.exists() && filePath == fileReadme.getPath())
    ) {
        filePath = path.join(path.dirname(filePath), 'index' + OUTPUT_EXTENSION);
    } else {
        filePath = PathUtils.setExtension(filePath, OUTPUT_EXTENSION);
    }

    return LocationUtils.normalize(filePath);
}
function fileToOutput ( output , filePath ) { var book = output . getBook ( ) ; var readme = book . getReadme ( ) ; var fileReadme = readme . getFile ( ) ; if ( path . basename ( filePath , path . extname ( filePath ) ) == 'README' || ( fileReadme . exists ( ) && filePath == fileReadme . getPath ( ) ) ) { filePath = path . join ( path . dirname ( filePath ) , 'index' + OUTPUT_EXTENSION ) ; } else { filePath = PathUtils . setExtension ( filePath , OUTPUT_EXTENSION ) ; } return LocationUtils . normalize ( filePath ) ; }
Convert a filePath (absolute) to a filename for output

@param {Output} output
@param {String} filePath
@return {String}
Convert a filePath ( absolute ) to a filename for output
Get the path to the file to output