create specified path (obj, fn) -> null
5994
function createDir (argv, next) {
  const loc = path.resolve(path.join(argv.d, argv.name))
  mkdirp(loc, function (err) {
    if (err) return next(err)
    process.chdir(loc)
    argv.directory = loc
    argv.d = loc
    next()
  })
}
582367
function create({values, name, root} = {}) {
  const envName = _getFileName(name);
  const envPath = path.resolve(
    root || config.get('env.rootDirectory'),
    envName,
  );
  const envContents = _getFileContents(values);

  fs.writeFileSync(envPath, envContents);
}
999343
private StructrPath checkPath(final Path obj) {

		if (obj == null) {
			throw new NullPointerException();
		}

		if (!(obj instanceof StructrPath)) {
			throw new ProviderMismatchException();
		}

		return (StructrPath)obj;
	}
417171
function (obj, path) {
    if (Object.prototype.hasOwnProperty.call(obj, path)) {
      return obj[path];
    }

    var keys = path.replace(/\[(\w+)\]/g, ".$1").replace(/^\./, "").split(".");
    var copy = {};
    for (var attr in obj) {
      if (Object.prototype.hasOwnProperty.call(obj, attr)) {
        copy[attr] = obj[attr];
      }
    }

    for (var i = 0, l = keys.length; i < l; i++) {
      if (Object.hasOwnProperty.call(copy, keys[i])) {
        copy = copy[keys[i]];
      } else {
        return;
      }
    }
    return copy;
  }
772764
def _put_obj(irods_path, obj):
    """"""
    text = json.dumps(obj, indent=2)
    _put_text(irods_path, text)
1087212
def _resolve_path(obj, path=None):
        
        if path:
            for attr_name in path.split('__'):
                obj = getattr(obj, attr_name)
        return obj
1210941
function setPath (obj, itemPath, value) {
  if (!isObj(obj) || typeof (itemPath) !== 'string') {
    return
  }

  const pathArr = itemPath.split('.')

  function noop (obj, i) {
    const item = pathArr[i]

    /**
     * Finally set the value when array is done
     */
    if (i + 1 === pathArr.length) {
      obj[item] = value
      return
    }

    if (!isNaN(parseInt(pathArr[i + 1])) && !Array.isArray(obj[item])) {
      obj[item] = []
    } else if (!isObj(obj[item])) {
      obj[item] = {}
    }

    /**
     * Carry on recursively.
     */
    return noop(obj[item], i + 1)
  }

  /**
   * Start recursion
   */
  return noop(obj, 0)
}
829650
function pushArr(path, obj, val) {
  path = path.split('/')
  path.forEach(function(subPath) {
    if (Array.isArray(obj[subPath])) return obj[subPath].push(val)
    obj = obj[subPath]
  })
}
529258
def get(obj, path, view=False, afilter=None):
    
    index = 0
    path_count = len(path) - 1
    target = obj
    head = type(target)()
    tail = head
    up = None
    for pair in path:
        key = pair[0]
        target = target[key]

        if view:
            if isinstance(tail, MutableMapping):
                if issubclass(pair[1], (MutableSequence, MutableMapping)) and index != path_count:
                    tail[key] = pair[1]()
                else:
                    tail[key] = target
                up = tail
                tail = tail[key]
            elif issubclass(tail.__class__, MutableSequence):
                if issubclass(pair[1], (MutableSequence, MutableMapping)) and index != path_count:
                    tail.append(pair[1]())
                else:
                    tail.append(target)
                up = tail
                tail = tail[-1]

        if not issubclass(target.__class__, (MutableSequence, MutableMapping)):
            if (afilter and (not afilter(target))):
                raise dpath.exceptions.FilteredValue

        index += 1

    if view:
        return head
    else:
        return target
601726
function makePath(object, path, index) {
		index = index || 0;
		var obj;

		if (path.length > index + 1) {
			obj = object[path[index]];

			// we always want the last object in an array
			if (_.isArray(obj)) obj = _.last(obj);

			makePath(obj, path, index + 1);
		} else {
			obj = object[path[index]];

			if (!obj) {
				// object doesn't exist yet so make it
				object[path[index]] = {};
			} else {
				if (!_.isArray(obj)) {
					// object isn't an array yet so make an array with the object as the first element
					object[path[index]] = [obj];
				}

				// append the new object
				object[path[index]].push({});
			}
		}
	}
1276214
function getLeafOfPath(obj, path, create_object = true) {
    const parts = Array.isArray(path) ? path.slice(0) : path.split('.');
    const last = parts.pop();
    if (parts.length > 0) {
        if (create_object !== false) {
            for (const part of parts) {
                obj = obj[part] || (obj[part] = {});
            }
        }
        else {
            for (const part of parts) {
                obj = obj[part];
                if (!obj) {
                    return [undefined, undefined];
                }
            }
        }
    }
    return [obj, last];
}
1359517
function baseGet(object, path) {
  path = _castPath(path, object);

  var index = 0,
      length = path.length;

  while (object != null && index < length) {
    object = object[_toKey(path[index++])];
  }
  return (index && index == length) ? object : undefined;
}
1112829
function resolveObject(path, obj) {
  return path.split(".").reduce(function (prev, curr) {
    return prev ? prev[curr] : undefined;
  }, obj || self);
}
539965
function create_node_by_path(context, path, len, tracker) {
	let node = context.state.rootNode;
	for (let i = 0; i < len; i++) {
		const k = path[i];
		if (k == "_") continue;
		if (k == "#") {
			node = context.state.rootNode;
			continue;
		}
		if (node_type(node[k]) != NodeTypes.NODE) {
			commit_node_prop(context, node, k, create_node(), tracker);
		}
		node = node[k];
	}
	return node;
}
923804
private Path  makePathAndBoundingBox(Line obj)
   {
      float x1 = (obj.x1 == null) ? 0 : obj.x1.floatValueX(this);
      float y1 = (obj.y1 == null) ? 0 : obj.y1.floatValueY(this);
      float x2 = (obj.x2 == null) ? 0 : obj.x2.floatValueX(this);
      float y2 = (obj.y2 == null) ? 0 : obj.y2.floatValueY(this);

      if (obj.boundingBox == null) {
         obj.boundingBox = new Box(Math.min(x1, x2), Math.min(y1, y2), Math.abs(x2-x1), Math.abs(y2-y1));
      }

      Path  p = new Path();
      p.moveTo(x1, y1);
      p.lineTo(x2, y2);
      return p;
   }
77440
function unsetPath(path, obj) {
  if(!isArray(path) || isEmpty(path)) {
    throw new TypeError(pathError)
  }

  if(!(isObject(obj) || isArray(obj))) {
    return obj
  }

  const key = path[0]

  if(!(isString(key) && !isEmpty(key) || isInteger(key) && key >= 0)) {
    throw new TypeError(pathError)
  }

  if(path.length === 1) {
    if(isArray(obj) && isInteger(key)) {
      return array.unset(key, obj)
    }

    if(isObject(obj) && isString(key)) {
      return object.unset(key, obj)
    }

    return obj
  }

  const next =
    obj[key]

  if(!(isObject(next) || isArray(next))) {
    return obj
  }

  if(isArray(obj)) {
    return array.set(key, unsetPath(path.slice(1), next), obj)
  }

  return object.set(key, unsetPath(path.slice(1), next), obj)
}
454151
function _openPath(treeData, path) {
        var objectPath = _filePathToObjectPath(treeData, path);

        function setOpen(node) {
            return node.set("open", true);
        }

        while (objectPath && objectPath.length) {
            var node = treeData.getIn(objectPath);
            if (isFile(node)) {
                objectPath.pop();
            } else {
                if (!node.get("open")) {
                    treeData = treeData.updateIn(objectPath, setOpen);
                }
                objectPath.pop();
                if (objectPath.length) {
                    objectPath.pop();
                }
            }
        }

        return treeData;
    }