mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
add js versions of basename and dirname
This commit is contained in:
parent
46422e6dbe
commit
b14265b5c3
1 changed files with 6 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue