Changeset 6503 for main/waeup.sirp/trunk/src/waeup/sirp/utils
- Timestamp:
- 3 Jul 2011, 19:16:04 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/utils/helpers.py
r6372 r6503 15 15 from zope.security.management import getInteraction 16 16 17 BUFSIZE = 8 * 1024 17 18 18 19 def removeFileOrDirectory(filepath): … … 387 388 return None 388 389 return principal 390 391 def cmp_files(file_descr1, file_descr2): 392 """Compare two files by their file descriptors. 393 394 Returns ``True`` if both are equal, ``False`` otherwise. 395 """ 396 while True: 397 b1 = file_descr1.read(BUFSIZE) 398 b2 = file_descr2.read(BUFSIZE) 399 if b1 != b2: 400 return False 401 if not b1: 402 return True
Note: See TracChangeset for help on using the changeset viewer.