add function to check for existance of folders

This commit is contained in:
hugh-obrien 2018-05-31 17:03:41 +01:00
parent d3ae276091
commit 063187b5fc

View file

@ -335,6 +335,11 @@ define [
return null return null
projectContainsFolder: () ->
for entity in @$scope.rootFolder.children
return true if entity.type == 'folder'
return false
existsInThisFolder: (folder, name) -> existsInThisFolder: (folder, name) ->
for entity in folder?.children or [] for entity in folder?.children or []
return true if entity.name is name return true if entity.name is name