Parses a {@link LogView} under a given path and using the given
{@link Log}.

@param path Path to the log view.
@param log Log for the view.
@return The parsed log view.
@throws IOException If the log view can't be read under the given
path.
174644
public static LogView parse(String path, Log log) throws IOException {
                return parse(new File(path), log);
        }
1015512
private static BufferedReader open(final String path) throws IOException {
    if (path.equals("-")) {
      return new BufferedReader(new InputStreamReader(System.in));
    }

    InputStream is = new FileInputStream(path);
    if (path.endsWith(".gz")) {
      is = new GZIPInputStream(is);
    }
    // I <3 Java's IO library.
    return new BufferedReader(new InputStreamReader(is));
  }
628375
private static void fsyncLineage(final Path path) throws IOException {
        Path cursor = path.toRealPath();
        while (cursor != null) {
            fsync(cursor);
            cursor = cursor.getParent();
        }
    }
178851
public static void logFileCreation(final Logger logger, final String path)
	{

		logger.logMessage(Level.INFO, "New File created:\t" + path);
	}
1141875
private static IPath parsePath(String path, IPath defaultPath, IPath rootPath) {
		if (!Strings.isNullOrEmpty(path)) {
			try {
				final IPath pathObject = Path.fromPortableString(path);
				if (pathObject != null) {
					if (rootPath != null && !pathObject.isAbsolute()) {
						return rootPath.append(pathObject);
					}
					return pathObject;
				}
			} catch (Throwable exception) {
				//
			}
		}
		return defaultPath;
	}
680504
public static OutputStream newOutputStream(String path) throws IOException
    {
        if (IOAdapter == null) return new FileOutputStream(path);
        return IOAdapter.create(path);
    }
990438
public void logMkDir(String path, INode newNode) {
    MkdirOp op = MkdirOp.getInstance();
    op.set(newNode.getId(), path, newNode.getModificationTime(), 
        newNode.getPermissionStatus());
    logEdit(op);
  }
273115
public Resource addPath(String path)
        throws IOException,MalformedURLException
    {
        if (path==null)
            return null;

        path = URI.canonicalPath(path);

        return newResource(URI.addPaths(_url.toExternalForm(),path));
    }
764637
public Response get(String path) throws IOException, RESTException {
        return get(path, null, null);
    }
590226
private JsonObject load(Path path) throws IOException {
    try (InputStream stream = Resources.getResource(path.toString()).openStream()) {
      return (JsonObject) JSON_PARSER.parse(new InputStreamReader(stream));
    }
  }
516031
void parseOneFile(final Path inputPath, final Writer outputWriter) throws IOException {
    try (final TFile.Reader.Scanner scanner = this.getScanner(inputPath)) {
      while (!scanner.atEnd()) {
        new LogFileEntry(scanner.entry()).write(outputWriter);
        scanner.advance();
      }
    }
  }
117853
public static String getResource(final String path) {
		final InputStream stream = getResourceStream(path);
		final BufferedReader reader = new BufferedReader(new InputStreamReader(stream));
		final Stream<String> lines = reader.lines();
		return lines.collect(Collectors.joining("\n"));
	}
8690
public HttpRequest getRequest(final String path) throws IOException {
		final GenericUrl url = getURL(path);
		return requestFactory.buildGetRequest(url);
	}
163110
public static ProtoFile parseUtf8(Path path) throws IOException {
    try (Reader reader = Files.newBufferedReader(path, UTF_8)) {
      return parse(path.toString(), reader);
    }
  }
1026592
public static BufferedReader newBufferedReader(String path) throws IOException
    {
        return new BufferedReader(new InputStreamReader(IOUtil.newInputStream(path), "UTF-8"));
    }
607321
public String request(String path) throws IOException {
        Content content;

        content = doRequest(path);
        return new String(unzip(content.bytes), ENCODING);
    }
1061700
private InputStream tryPath(String path) {
    Logger.getLogger().debug("Trying path \"" + path + "\".");
    return getClass().getResourceAsStream(path);
  }