@Override public FileName createName(String absPath, FileType type) { return ((AbstractFileName) fileName).createName(absPath, type); }
/** * Returns the name of the parent of the file. * * @return the FileName of the parent. */ @Override public FileName getParent() { final String parentPath; final int idx = getPath().lastIndexOf(SEPARATOR_CHAR); if (idx == -1 || idx == getPath().length() - 1) { // No parent return null; } else if (idx == 0) { // Root is the parent parentPath = SEPARATOR; } else { parentPath = getPath().substring(0, idx); } return createName(parentPath, FileType.FOLDER); }
/** * Returns the name of the parent of the file. * * @return the FileName of the parent. */ @Override public FileName getParent() { final String parentPath; final int idx = getPath().lastIndexOf(SEPARATOR_CHAR); if (idx == -1 || idx == getPath().length() - 1) { // No parent return null; } else if (idx == 0) { // Root is the parent parentPath = SEPARATOR; } else { parentPath = getPath().substring(0, idx); } return createName(parentPath, FileType.FOLDER); }
/** * Returns the name of the parent of the file. * * @return the FileName of the parent. */ @Override public FileName getParent() { final String parentPath; final int idx = getPath().lastIndexOf(SEPARATOR_CHAR); if (idx == -1 || idx == getPath().length() - 1) { // No parent return null; } else if (idx == 0) { // Root is the parent parentPath = SEPARATOR; } else { parentPath = getPath().substring(0, idx); } return createName(parentPath, FileType.FOLDER); }
/** * Returns the name of the parent of the file. * @return the FileName of the parent. */ @Override public FileName getParent() { final String parentPath; final int idx = getPath().lastIndexOf(SEPARATOR_CHAR); if (idx == -1 || idx == getPath().length() - 1) { // No parent return null; } else if (idx == 0) { // Root is the parent parentPath = SEPARATOR; } else { parentPath = getPath().substring(0, idx); } return createName(parentPath, FileType.FOLDER); }
return ((AbstractFileName) realBase).createName(resolvedPath, fileType);
return ((AbstractFileName) realBase).createName(resolvedPath, fileType);
return ((AbstractFileName) realBase).createName(resolvedPath, fileType);
return ((AbstractFileName) realBase).createName(resolvedPath, fileType);
return ((AbstractFileName) realBase).createName(resolvedPath, fileType);