class DirsDelegator extends BaseDelegator implements IDirsDelegator {

    @Override
    public List<IFileSpec> getDirectories(@Nonnull final List<IFileSpec> fileSpecs,
            final boolean clientOnly, final boolean deletedOnly, final boolean haveListOnly)
            throws ConnectionException, AccessException {

        Validate.notNull(fileSpecs);

        try {
            GetDirectoriesOptions directoriesOptions = new GetDirectoriesOptions()
                    .setClientOnly(clientOnly).setDeletedOnly(deletedOnly)
                    .setHaveListOnly(haveListOnly);
            return getDirectories(fileSpecs, directoriesOptions);
        } catch (final ConnectionException | AccessException exc) {
            throw exc;
        } catch (P4JavaException exc) {
            // TODO Why isn't RequestException handled the same as Access and
            // Connection?
            Log.warn("Unexpected exception in IServer.getDirectories: %s", exc);
            return Collections.emptyList();
        }
    }

    public  DirsDelegator(final IOptionsServer server);

}