String (@NotNull String path) { String systemIndependentPathForm = FileUtil.toSystemIndependentName(path); if (systemIndependentPathForm.equals("/")) { return systemIndependentPathForm; } else { return StringUtil.trimEnd(systemIndependentPathForm, "/"); } }