Done ticket GEPAFINBE-8

This commit is contained in:
harish
2024-08-21 20:55:13 +05:30
parent fa714faef9
commit e7466d16ec
45 changed files with 1642 additions and 0 deletions

View File

@@ -46,4 +46,17 @@ public class Utils {
}
return null;
}
public static String extractFileName(String filePath) {
if (filePath == null || filePath.isEmpty()) {
return null;
}
int lastSlashIndex = filePath.lastIndexOf('/');
if (lastSlashIndex >= 0 && lastSlashIndex < filePath.length() - 1) {
return filePath.substring(lastSlashIndex + 1);
} else {
return filePath;
}
}
}