try {\r
String targetFileName = FilenameUtils.removeExtension(sourceFileName) + MP4EXT;\r
targetPath = Paths.get(localLowresTargetPath, targetFileName);\r
- if (!targetPath.toFile().exists()) {\r
+ if (!Files.exists(targetPath)) {\r
// jobRuntime.setDescription(String.format("%s: %s", jobRuntime.getDescription(), details));\r
jobRuntime.setDescription(String.format("%s transzkódolása", details));\r
String sourceFile = Paths.get(globalHiresSourcePath, sourceFileName).toString();\r
\r
//a sikeres transzkod utan nem mindig van ott egybol a fajl\r
long started = System.currentTimeMillis();\r
- while (!targetPath.toFile().exists()) {\r
+ while (!Files.exists(targetPath)) {\r
long current = System.currentTimeMillis();\r
//max 5 perc varakozas\r
if (current - started > 5 * 60 * 1000)\r
logger.catching(e);\r
}\r
try {\r
- if (deleteSource && targetPath != null && targetPath.toFile().exists())\r
+ if (deleteSource && targetPath != null && Files.exists(targetPath))\r
Files.delete(targetPath);\r
} catch (Exception e) {\r
logger.catching(e);\r
}\r
lowresPath = Paths.get(webPath, targetPath);\r
int version = 1;\r
- while (lowresPath.toFile().exists()) {\r
+ while (Files.exists(lowresPath)) {\r
String fileName = transcodedFileName + version + MP4EXT;\r
lowresPath = Paths.get(lowresPath.toString().replace(transcodedFileName, fileName));\r
targetPath = targetPath.replace(transcodedFileName, fileName);\r