filePath = ((ClassPathResource) flowResource).getPath(); } else if (flowResource instanceof FileSystemResource) { filePath = truncateFilePath(((FileSystemResource) flowResource).getPath(), basePath); } else if (flowResource instanceof UrlResource || flowResource instanceof VfsResource) { try { filePath = truncateFilePath(flowResource.getURL().getPath(), basePath); } catch (IOException e) { throw new IllegalArgumentException("Unable to obtain path: " + e.getMessage());
filePath = ((ClassPathResource) flowResource).getPath(); } else if (flowResource instanceof FileSystemResource) { filePath = truncateFilePath(((FileSystemResource) flowResource).getPath(), basePath); } else if (flowResource instanceof UrlResource || flowResource instanceof VfsResource) { try { filePath = truncateFilePath(flowResource.getURL().getPath(), basePath); } catch (IOException e) { throw new IllegalArgumentException("Unable to obtain path: " + e.getMessage());
} else if (flowResource instanceof FileSystemResource) { basePath = removeClasspathScheme(basePath); filePath = truncateFilePath(((FileSystemResource) flowResource).getPath(), basePath); } else if (flowResource instanceof UrlResource) { basePath = removeClasspathScheme(basePath); try { filePath = truncateFilePath(((UrlResource) flowResource).getURL().getPath(), basePath); } catch (IOException e) { throw new IllegalArgumentException("Unable to obtain path: " + e.getMessage());