\r
public static boolean isCatchedFileExists(Path escortFile) {\r
Path catchedFilePath = Paths.get(escortFile.toString() + DOT_CATCHED);\r
- return catchedFilePath.toFile().exists();\r
+ return Files.exists(catchedFilePath);\r
}\r
\r
/***\r
*/\r
public static boolean isMediaCatched(Path mediaFile) {\r
Path catchedFile = createMediaCathFilePath(mediaFile);\r
- return catchedFile.toFile().exists();\r
+ return Files.exists(catchedFile);\r
}\r
\r
public static boolean isMetadataExists(String filePath, String fileName) throws IOException {\r
boolean result = false;\r
String metadataFileName = fileName + DOT_JSON;\r
Path metadataPath = Paths.get(filePath, STATUSFOLDER, metadataFileName);\r
- result = metadataPath.toFile().exists();\r
+ result = Files.exists(metadataPath);\r
return result;\r
}\r
\r
public static void notifyRecipient(Path escortFile, Logger logger, Message msg) {\r
- if (escortFile.toFile().exists()) {\r
+ if (Files.exists(escortFile)) {\r
try {\r
BasicDBObject downloadable = EscortFiles.decode(escortFile);\r
String recipientKey = "recipient";\r