fix magic so that it can detect binary file

This commit is contained in:
tqchen@graphlab.com
2014-08-26 12:17:27 -07:00
parent 9eb32b9dd4
commit 46f14b8c27
4 changed files with 36 additions and 5 deletions

View File

@@ -102,6 +102,9 @@ class FileStream : public IStream {
virtual void Write(const void *ptr, size_t size) {
fwrite(ptr, size, 1, fp);
}
inline void Seek(size_t pos) {
fseek(fp, 0, SEEK_SET);
}
inline void Close(void) {
fclose(fp);
}