isExistParentNode function

Future isExistParentNode(
  1. dynamic path
)

To check preparation parent nodes if it does not exist can not proceed indicator

Implementation

Future isExistParentNode(var path) async{

  var pathList = path.split(':');
  var parentPath = ':';

  for(var p in pathList){

    if(p.isNotEmpty) {
      parentPath += p;
      try {
        await Storage.controller.get(parentPath);
      } on StorageException {
        logger.i('Stare to create a $parentPath Node,it does not exist');
        await Storage.controller.add(NodeImpl(parentPath, Types.owner));
      }
      parentPath += ':';
    }
  }

}