- XBT_INFO("Try to read %llu from '%s'", file->size(), filename);
- sg_size_t read = file->read(file->size());
- XBT_INFO("Have read %llu from '%s'. Offset is now at: %llu", read, filename, file->tell());
- XBT_INFO("Seek back to the begining of the stream...");
- file->seek(0, SEEK_SET);
- XBT_INFO("Offset is now at: %llu", file->tell());
-
- delete file;
+ XBT_INFO("Try to read %llu from '%s'", file.size(), filename);
+ sg_size_t read = file.read(file.size());
+ XBT_INFO("Have read %llu from '%s'. Offset is now at: %llu", read, filename, file.tell());
+ XBT_INFO("Seek back to the beginning of the stream...");
+ file.seek(0, SEEK_SET);
+ XBT_INFO("Offset is now at: %llu", file.tell());