Test whether the target file/directory is stale based on the source file/directory.
(target, source)
| 224 | |
| 225 | |
| 226 | def is_stale(target, source): |
| 227 | """Test whether the target file/directory is stale based on the source |
| 228 | file/directory. |
| 229 | """ |
| 230 | if not os.path.exists(target): |
| 231 | return True |
| 232 | target_mtime = recursive_mtime(target) or 0 |
| 233 | return compare_recursive_mtime(source, cutoff=target_mtime) |
| 234 | |
| 235 | |
| 236 | class BaseCommand(Command): |
no test coverage detected