'Usage: compare [remotedir] [localdir] - compare the remote directory with the local directory
remotedir - the remote directory at Baidu Yun (after app\'s directory). if not specified, it defaults to the root directory.
localdir - the local directory, if not specified, it defaults to the current directory.
skip_remote_only_dirs - skip remote-only sub-directories (faster if the remote directory is much larger than the local one). it defaults to False.'

def compare(self, remotedir=None, localdir=None, skip_remote_only_dirs=False):

    (same, diff, local, remote) = self.__compare(get_pcs_path(remotedir), localdir, str2bool(skip_remote_only_dirs))
    pr(u'====    Same    files    ===')
    for c in same:
        pr(u'{}    -    {}'.format(c[0], c[1]))
    pr(u'====    Different    files    ===')
    for d in diff:
        pr(u'{}    -    {}'.format(d[0], d[1]))
    pr(u'====    Local    only    ====')
    for l in local:
        pr(u'{}    -    {}'.format(l[0], l[1]))
    pr(u'====    Remote    only    ====')
    for r in remote:
        pr(u'{}    -    {}'.format(r[0], r[1]))
    pr(u'\nStatistics:')
    pr(u'--------------------------------')
    pr(u'Same:    {}'.format(len(same)))
    pr(u'Different:    {}'.format(len(diff)))
    pr(u'Local    only:    {}'.format(len(local)))
    pr(u'Remote    only:    {}'.format(len(remote)))
    self.result[u'same'] = same
    self.result[u'diff'] = diff
    self.result[u'local'] = local
    self.result[u'remote'] = remote
    return const.ENoError
