Package io.gitlab.ntduycse.util
Class PathUtils
java.lang.Object
io.gitlab.ntduycse.util.PathUtils
Path helpers for Spring Quickstart log output.
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringrelativeToProject(org.gradle.api.Project project, File file) Returns a display-friendly path relative to the project directory, using forward slashes.
-
Method Details
-
relativeToProject
Returns a display-friendly path relative to the project directory, using forward slashes. Falls back to the absolute path (with forward slashes) whenfileis not inside the project directory, so the helper works on both Unix and Windows.- Parameters:
project- the owning projectfile- the file to relativize- Returns:
- the relative path (or absolute fallback), always using
/as separator
-