Skip to content
Snippets Groups Projects
Commit b14265b5 authored by Robin Appelman's avatar Robin Appelman
Browse files

add js versions of basename and dirname

parent 46422e6d
No related branches found
No related tags found
No related merge requests found
......@@ -154,6 +154,12 @@ OC={
$('head').append(style);
}
},
basename: function(path) {
return path.replace(/\\/g,'/').replace( /.*\//, '' );
},
dirname: function(path) {
return path.replace(/\\/g,'/').replace(/\/[^\/]*$/, '');;
}
/**
* do a search query and display the results
* @param query the search query
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment