Class OsSpecificUtil
- java.lang.Object
-
- com.puppycrawl.tools.checkstyle.utils.OsSpecificUtil
-
public final class OsSpecificUtil extends Object
Class which provides OS related utilities.
-
-
Constructor Summary
Constructors Modifier Constructor Description private
OsSpecificUtil()
Hiding public and default constructor.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
updateDirectory(Path directory)
Updates the specified directory by resolving symbolic links, ensuring it exists, and creating any necessary parent directories.
-
-
-
Constructor Detail
-
OsSpecificUtil
private OsSpecificUtil()
Hiding public and default constructor.
-
-
Method Detail
-
updateDirectory
public static void updateDirectory(Path directory) throws IOException
Updates the specified directory by resolving symbolic links, ensuring it exists, and creating any necessary parent directories. If the provided path is a symbolic link, it resolves it to the actual directory, throwing an IOException if the resolved path is not a directory. Creates directories if they do not exist.- Parameters:
directory
- The path to the directory to be updated.- Throws:
IOException
- If an I/O error occurs or if the resolved symbolic link is not a directory.
-
-