Package com.google.gerrit.common
Class FileUtil
java.lang.Object
com.google.gerrit.common.FileUtil
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
static void
static long
lastModified
(Path p) Get the last modified time of a path.static void
static Path
mkdirsOrDie
(Path p, String errMsg) static boolean
modified
(org.eclipse.jgit.storage.file.FileBasedConfig cfg)
-
Method Details
-
modified
public static boolean modified(org.eclipse.jgit.storage.file.FileBasedConfig cfg) throws IOException - Throws:
IOException
-
mkdir
-
chmod
-
chmod
-
lastModified
Get the last modified time of a path.Equivalent to
File#lastModified()
, returning 0 on errors, including file not found. Callers that prefer exceptions can useFiles.getLastModifiedTime(Path, java.nio.file.LinkOption...)
.- Parameters:
p
- path.- Returns:
- last modified time, in milliseconds since epoch.
-
mkdirsOrDie
-