class OneDriveListService implements ListService {

    @Override
    public AttributedList<Path> list(final Path directory, final ListProgressListener listener) throws BackgroundException {
        if(directory.isRoot()) {
            final AttributedList<Path> list = new AttributedList<>();
            list.add(MYFILES_NAME);
            list.add(SHARED_NAME);
            listener.chunk(directory, list);
            return list;
        }
        else if(SHARED_NAME.equals(directory)) {
            return new OneDriveSharedWithMeListService(session).list(directory, listener);
        }
        else {
            return new GraphItemListService(session).list(directory, listener);
        }
    }

    public  OneDriveListService(final GraphSession session);

}