/** * Looks up the last element of a path. */ @Nullable private DirectoryEntry lookUpLast( @Nullable File dir, Name name, Set<? super LinkOption> options, int linkDepth) throws IOException { Directory directory = toDirectory(dir); if (directory == null) { return null; } DirectoryEntry entry = directory.get(name); if (entry == null) { return new DirectoryEntry(directory, name, null); } File file = entry.file(); if (!options.contains(LinkOption.NOFOLLOW_LINKS) && file.isSymbolicLink()) { return followSymbolicLink(dir, (SymbolicLink) file, linkDepth); } return getRealEntry(entry); }
DirectoryEntry entry = directory.get(name); if (entry == null) { return null;
/** * Looks up the last element of a path. */ @Nullable private DirectoryEntry lookUpLast( @Nullable File dir, Name name, Set<? super LinkOption> options, int linkDepth) throws IOException { Directory directory = toDirectory(dir); if (directory == null) { return null; } DirectoryEntry entry = directory.get(name); if (entry == null) { return new DirectoryEntry(directory, name, null); } File file = entry.file(); if (!options.contains(LinkOption.NOFOLLOW_LINKS) && file.isSymbolicLink()) { return followSymbolicLink(dir, (SymbolicLink) file, linkDepth); } return getRealEntry(entry); }
DirectoryEntry entry = directory.get(name); if (entry == null) { return null;