synchronized (this)
{
attach();
if (!type.hasChildren())
{
throw new FileSystemException("vfs.provider/list-children-not-folder.error", name);
}
// Use cached info, if present
if (children != null)
{
return resolveFiles(children);
}
// allow the filesystem to return resolved children. e.g. prefill type for webdav
FileObject[] childrenObjects;
try
{
childrenObjects = doListChildrenResolved();
children = extractNames(childrenObjects);
}
catch (Exception exc)
{
throw new FileSystemException("vfs.provider/list-children.error", new Object[]{name}, exc);
}
if (childrenObjects != null)
{
return childrenObjects;
}
// List the children
final String[] files;
try
{
files = doListChildren();
}
catch (Exception exc)
{
throw new FileSystemException("vfs.provider/list-children.error", new Object[]{name}, exc);
}
if (files == null || files.length == 0)
{
// No children