Class ProjectFileUtils
java.lang.Object
net.mcreator.ui.mcp.tools.utils.ProjectFileUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic PathgetCommonRoot(MCreator mcreator) static StringgetPathInWorkspace(Path workspaceRoot, File file) static PathgetWorkspaceRoot(MCreator mcreator) static FileresolveFile(Path workspaceRoot, Path root, String path)
-
Constructor Details
-
ProjectFileUtils
public ProjectFileUtils()
-
-
Method Details
-
getWorkspaceRoot
- Throws:
IOException
-
getCommonRoot
- Returns:
- canonical common root of the source and resource roots, or null if it does not exist
- Throws:
IOException
-
resolveFile
@Nullable public static File resolveFile(Path workspaceRoot, Path root, String path) throws IOException - Returns:
- canonical file for the workspace-relative path, or null if it is outside the given root
- Throws:
IOException
-
getPathInWorkspace
-