function dirname(resource) {
    if (resource.scheme === Schemas.file) {
        return URI.file(paths.dirname(fsPath(resource)));
    }
    var dirname = paths.dirname(resource.path, '/');
    if (resource.authority && dirname.length && dirname.charCodeAt(0) !== 47 /* Slash */) {
        return null; // If a URI contains an authority component, then the path component must either be empty or begin with a CharCode.Slash ("/") character
    }
    return resource.with({
        path: dirname
    });
}
/**
 * Return a URI representing the directory of a URI path.
 *
 * @param resource The input URI.
 * @returns The URI representing the directory of the input URI.
 */
Return a URI representing the directory of a URI path.
@param resource The input URI.
@returns The URI representing the directory of the input URI.
Return a URI representing the directory of a URI path . @param resource The input URI . @returns The URI representing the directory of the input URI .
function dirname(resource) {
    if (resource.scheme === Schemas.file) {
        return URI.file(paths.dirname(fsPath(resource)));
    }
    var dirname = paths.dirname(resource.path, '/');
    if (resource.authority && dirname.length && dirname.charCodeAt(0) !== 47 ) {
        return null; 
    }
    return resource.with({
        path: dirname
    });
}
function dirname ( resource ) { if ( resource . scheme === Schemas . file ) { return URI . file ( paths . dirname ( fsPath ( resource ) ) ) ; } var dirname = paths . dirname ( resource . path , '/' ) ; if ( resource . authority && dirname . length && dirname . charCodeAt ( 0 ) !== 47 ) { return null ; } return resource . with ( { path : dirname } ) ; }
Return a URI representing the directory of a URI path.
Return a URI representing the directory of a URI path .
/* Slash */ // If a URI contains an authority component, then the path component must either be empty or begin with a CharCode.Slash ("/") character