final File file = getBackend();
final File child = new File(file, name);
if (child.exists() == false)
{
throw new ContentIOException("Not found:" + child);
}
try
{
if (IOUtils.getInstance().isSubDirectory(file, child) == false)
{
throw new ContentIOException("The given entry does not point to a sub-directory of this content-location");
}
}
catch (IOException e)
{
throw new ContentIOException("IO Error.", e);
}
if (child.isDirectory())
{
return new FileContentLocation(this, child);
}
else if (child.isFile())
{
return new FileContentItem(this, child);
}
else
{
throw new ContentIOException("Not File nor directory.");
}
}