@log_calls<EOL><INDENT>def relative_dir_walk(self, dir):<DEDENT>
result = []<EOL>if S3URL.is_valid(dir):<EOL><INDENT>basepath = S3URL(dir).path<EOL>for f in (f for f in self.s3walk(dir) if not f['<STR_LIT>']):<EOL><INDENT>result.append(os.path.relpath(S3URL(f['<STR_LIT:name>']).path, basepath))<EOL><DEDENT><DEDENT>else:<EOL><INDENT>for f in (f for f in self.local_walk(dir) if not os.path.isdir(f)):<EOL><INDENT>result.append(os.path.relpath(f, dir))<EOL><DEDENT><DEDENT>return result<EOL>
Generic version of directory walk. Return file list without base path
           for comparison.