mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
#384 Provide Create Folder button
This commit is contained in:
@@ -90,6 +90,20 @@ export class DocumentListService {
|
||||
return Observable.fromPromise(this.apiService.getInstance().nodes.deleteNode(nodeId));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new folder in the path.
|
||||
* @param name
|
||||
* @param path
|
||||
* @returns {any}
|
||||
*/
|
||||
createFolder(name: string, path: string): Observable<any> {
|
||||
return Observable.fromPromise(this.apiService.getInstance().nodes.createFolder(name, path))
|
||||
.map(res => {
|
||||
return res;
|
||||
})
|
||||
.catch(this.handleError);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the folder node with the content.
|
||||
* @param folder Path to folder.
|
||||
|
Reference in New Issue
Block a user