\r
Path template = getSOAPTemplate(GETCUSTOMVIEW);\r
\r
- if (!template.toFile().exists())\r
+ if (!Files.exists(template))\r
throw new FileNotFoundException(template.toString());\r
try {\r
soap = new String(Files.readAllBytes(template));\r
\r
Path template = getSOAPTemplate(GETMEDIAUSAGEBYUTRANGE);\r
\r
- if (!template.toFile().exists())\r
+ if (!Files.exists(template))\r
throw new FileNotFoundException(template.toString());\r
\r
try {\r
boolean found = false;\r
for (Path subtitleDir : this.subsDirectoriesList) {\r
Path source = Paths.get(subtitleDir.toString(), new String[] { subtitleName });\r
- if (source.toFile().exists()) {\r
+ if (Files.exists(source)) {\r
found = true;\r
logger.info(this.subtitleMarker, "Found missing {}", source);\r
Path target = Paths.get(missingSubsRoot.toString(), new String[] { subtitleName });\r
- if (target.toFile().exists())\r
+ if (Files.exists(target))\r
logger.info(this.subtitleMarker, "Missing subtitle {} already exists, overriding", target);\r
Files.copy(source, target, new CopyOption[] { StandardCopyOption.REPLACE_EXISTING });\r
boolean isContentEquals = Arrays.equals(Files.readAllBytes(source), Files.readAllBytes(target));\r