home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  

Book HomeJava and XSLTSearch this book

8.97. File::Compare

Compares the contents of two sources, each of which can be a file or a filehandle. Returns 0 if the sources are equal, 1 if they are unequal, and -1 on error. File::Compare provides two functions.


cmp (file1, file2[, buffsize])

cmp is a synonym for compare. Exported on request.


compare (file1, file2[, buffsize])

Compares file1 to file2. Exported by default. If present, buffsize specifies the size of the buffer to use for the comparison.

Library Navigation Links

Copyright © 2002 O'Reilly & Associates. All rights reserved.