src/storage/source/PartitionedFile.cc
int PartitionedFile::writeDataDirect(int handle, void* data, size_t length) {
    if ((handle < 0) || (data == nullptr)) {
        cout << "PartitionedFile: Error: invalid handle or data is nullptr.\n";
        return -1;
    }
    size_t retSize = write(handle, data, length);
    if (retSize != length) {
        cout << "written bytes:" << retSize << "\n";
        return -1;
    } else {
        return 0;
    }
}
/**
 * Write data specified to the current file position using direct I/O.
 */
Write data specified to the current file position using direct I/O.
Write data specified to the current file position using direct I / O .
int PartitionedFile::writeDataDirect(int handle, void* data, size_t length) {
    if ((handle < 0) || (data == nullptr)) {
        cout << "PartitionedFile: Error: invalid handle or data is nullptr.\n";
        return -1;
    }
    size_t retSize = write(handle, data, length);
    if (retSize != length) {
        cout << "written bytes:" << retSize << "\n";
        return -1;
    } else {
        return 0;
    }
}
int PartitionedFile :: writeDataDirect ( int handle , void * data , size_t length ) { if ( ( handle < 0 ) || ( data == nullptr ) ) { cout << " \n " ; return -1 ; } size_t retSize = write ( handle , data , length ) ; if ( retSize != length ) { cout << " " << retSize << " \n " ; return -1 ; } else { return 0 ; } }
Write data specified to the current file position using direct I/O.
Write data specified to the current file position using direct I / O .