(path)
| 114 | return fp.read() |
| 115 | |
| 116 | def rlistdir(path): |
| 117 | res = [] |
| 118 | for name in sorted(os.listdir(path)): |
| 119 | p = os.path.join(path, name) |
| 120 | if os.path.isdir(p) and not os.path.islink(p): |
| 121 | res.append(name + '/') |
| 122 | for n in rlistdir(p): |
| 123 | res.append(name + '/' + n) |
| 124 | else: |
| 125 | res.append(name) |
| 126 | return res |
| 127 | |
| 128 | def supports_file2file_sendfile(): |
| 129 | # ...apparently Linux and Solaris are the only ones |