class SingleTransferItemFinder implements TransferItemFinder {

    @Override
    public Set<TransferItem> find(final CommandLine input, final TerminalAction action, final Path remote) {
        if(input.getOptionValues(action.name()).length == 2) {
            switch(action) {
                case download:
                    return new DownloadTransferItemFinder().find(input, action, remote);
                case upload:
                case synchronize:
                    return new UploadTransferItemFinder().find(input, action, remote);
            }
        }
        else {
            switch(action) {
                case upload:
                case synchronize:
                    return Collections.emptySet();
            }
        }
        // Relative to current working directory using prefix finder.
        return Collections.singleton(
                new TransferItem(remote, LocalFactory.get(prefixer.normalize(remote.getName())))
        );
    }

}