@Test public void testGetParentFolderName_1() throws Exception { String folderPath = "/home/impetus/"; String result = FileNameUtils.getParentFolderName(folderPath); assertNotNull(result); }
public static String getParentFolderName(String folderPath) { if (folderPath.endsWith(File.separator)) { folderPath = folderPath.substring(0, folderPath.length() - 1); } int end = folderPath.lastIndexOf(File.separator); int start = folderPath.lastIndexOf(File.separator, end - 1); String parentFolderName = folderPath.substring(start + 1, end); return parentFolderName; }
FileNameUtils { public static String getParentFolderName(String folderPath) { if (folderPath.endsWith(File.separator)) { folderPath = folderPath.substring(0, folderPath.length() - 1); } int end = folderPath.lastIndexOf(File.separator); int start = folderPath.lastIndexOf(File.separator, end - 1); String parentFolderName = folderPath.substring(start + 1, end); return parentFolderName; } }
FileNameUtils { public static String getParentFolderName(String folderPath) { if (folderPath.endsWith(File.separator)) { folderPath = folderPath.substring(0, folderPath.length() - 1); } int end = folderPath.lastIndexOf(File.separator); int start = folderPath.lastIndexOf(File.separator, end - 1); String parentFolderName = folderPath.substring(start + 1, end); return parentFolderName; }  }
FileNameUtils { public static String getParentFolderName(String folderPath) { if (folderPath.endsWith(File.separator)) { folderPath = folderPath.substring(0, folderPath.length() - 1); } int end = folderPath.lastIndexOf(File.separator); int start = folderPath.lastIndexOf(File.separator, end - 1); String parentFolderName = folderPath.substring(start + 1, end); return parentFolderName; }  static String getFileExtension(String fileName); static boolean isTarGz(String componentExtension); static boolean isZip(String componentExtension); static boolean isUnsupported(String componentExtension); static String convertToValidPath(String path); static String getName(String filename); static int indexOfLastSeparator(String filename); static String getDependencyFileName(String osName,
			String componentName); static String getInstallerFilePath(String osName,
			String componentName); static String getSciprtPath(String technology, String fileName); static String getParentFolderName(String folderPath); static ONSFileType getFileType(String fileName); static String getPathFromArchive(String archiveFile,
			String charSequence); static String getExtractedDirectoryName(String archiveFile); static String getComponentEnvFilePath(String componentName); }
FileNameUtils { public static String getParentFolderName(String folderPath) { if (folderPath.endsWith(File.separator)) { folderPath = folderPath.substring(0, folderPath.length() - 1); } int end = folderPath.lastIndexOf(File.separator); int start = folderPath.lastIndexOf(File.separator, end - 1); String parentFolderName = folderPath.substring(start + 1, end); return parentFolderName; }  static String getFileExtension(String fileName); static boolean isTarGz(String componentExtension); static boolean isZip(String componentExtension); static boolean isUnsupported(String componentExtension); static String convertToValidPath(String path); static String getName(String filename); static int indexOfLastSeparator(String filename); static String getDependencyFileName(String osName,
			String componentName); static String getInstallerFilePath(String osName,
			String componentName); static String getSciprtPath(String technology, String fileName); static String getParentFolderName(String folderPath); static ONSFileType getFileType(String fileName); static String getPathFromArchive(String archiveFile,
			String charSequence); static String getExtractedDirectoryName(String archiveFile); static String getComponentEnvFilePath(String componentName);  }