Get string value by path.
@param list subject
@param path nodes to walk in map
@return value
196303
public static Optional<String> getString(final List list, final Integer... path) {
        return get(list, String.class, path);
    }
59976
public static <T> T getUnsafe(final List list, final Class<T> clazz, final Integer... path) {
        return get(list, clazz, path).orElseThrow(() -> new IllegalAccessError(
            "List "
            + list
            + " does not have value of type "
            + clazz.getName()
            + " by "
            + Arrays.stream(path).map(Object::toString).collect(Collectors.joining(".")))
        );
    }
836975
static List<String> readLinesFromResource(String path)
    {
        String file = tryToLoadResource(path);

        if (file == null || file.isEmpty())
        {
            return Collections.emptyList();
        }

        String[] lines = file.split("\n");

        LOG.trace("Successfully read [{}] lines from resource [{}]", lines.length, path);
        return Arrays.asList(lines);
    }
374195
public StringPath get(StringPath path) {
        StringPath newPath = getString(toString(path));
        return addMetadataOf(newPath, path);
    }
77839
public List<V> getChildValues(List<P> path) {

        CmsPathTree<P, V> descendant = findNode(path);
        if (descendant != null) {
            return descendant.getChildValues();
        } else {
            return Collections.emptyList();
        }
    }
467124
public static List<String> getTokens(String path) {
        if (path == null) {
            throw MESSAGES.nullArgument("path");
        }
        List<String> list = new ArrayList<String>();
        getTokens(list, path);
        return list;
    }
201683
public boolean hasPath(String path) {
        Props props = pathMap.get(path);
        return props != null && !props.isEmpty();
    }
956296
public static <A, B> Optional<Map<A, B>> getMap(final List list, final Integer... path) {
        return get(list, Map.class, path).map(m -> (Map<A, B>) m);
    }
128945
public static List<String> tokenize_path(String path) {
        String[] toks = path.split(SEPERATOR);
        ArrayList<String> rtn = new ArrayList<String>();
        for (String str : toks) {
            if (!str.isEmpty()) {
                rtn.add(str);
            }
        }
        return rtn;
    }
1187728
public static Map<String, String> read(final String path) {

        Map<String, String> map = new HashMap<String, String>();

        if (path != null) {
            try {
                Properties p = loadProperties(path);

                for (Object key : p.keySet()) {

                    String value = p.getProperty(String.valueOf(key));

                    // remove single/double quotes
                    if ((value.startsWith("\"") && value.endsWith("\"")) ||
                            (value.startsWith("\'") && value.endsWith("\'"))) {
                        value = value.substring(1, value.length() - 1);
                    }

                    value = value.trim();

                    if (!value.equals("")) {
                        map.put(String.valueOf(key), value);
                    }
                }

            } catch (Exception e) {
                log.error(e.getMessage(), e);
            }
        }

        return map;
    }
413336
public static String formatPath(List<ChildNumber> path) {
        return PATH_JOINER.join(Iterables.concat(Collections.singleton("M"), path));
    }
973070
public static Object getByPath(Object target, List<String> path) {
        Object obj = target;

        for (String field : path) {
            if (obj == null) {
                return null;
            }
            obj = evaluate(obj, trimType(field));
        }

        return obj;
    }
586639
public static ArrayList<File> getDirectoriesInDirectoryTree(String path) {
		File file = new File(path);
		return getContentsInDirectoryTree(file, "*", false, true);
	}
320329
public void setValue(List<P> path, V value) {

        ensureNode(path).setValue(value);

    }
360549
public Set<String> getProperties(String path) {
        Props props = pathMap.get(path);
        return props == null ? null : props.getProperties();
    }
1024996
protected List<ChildData> getChildren(String path) {
        if (!checkExists(path)) {
            return new ArrayList<>();
        }
        try {
            List<ChildData> childDataList = new ArrayList<>();
            List<String> children = client.getChildren().forPath(path);
            childDataList.addAll(children.stream().map(child -> getData(path + "/" + child)).collect(Collectors.toList()));
            return childDataList;
        } catch (Exception e) {
            throw new NiubiException(e);
        }
    }
606879
public static ConfigList getValueList(Config config, String path) {
        try {
            return config.getList(path);
        } catch (ConfigException.Missing | ConfigException.WrongType e) {
            if (e instanceof ConfigException.WrongType) {
                LOGGER.warn(e.getMessage(), e);
            }
            return null;
        }
    }