388 B
388 B
Работы со строками
- Получить путь баз файла
fullPath = "/home/user/dir/report.json";
fullPath.substring(0,fullPath.lastIndexOf('/') + 1); // /home/user/dir/
- Получить только файл из пусти
fullPath = "/home/user/dir/report.json";
fullPath.substring(fullPath.lastIndexOf('/') + 1); // report.json