Write `data` to BDIO file to the end of the last record.
BDIO_write!(fb::BDIOstream,data,hash::Bool=true)
BDIO_write!(fb::BDIOstream,data,hash::Bool=true)
Write `data` to BDIO file to the end of the last record.
## Arguments
## Arguments
- `fb`: A BDIOstream type. It must be associated with a file in either `w` or `a` mode.
- `fb`: A BDIOstream type. It must be associated with a file in either `w` or `a` mode.
- `data`: Data to write to file.
- `data`: Data to write to file.
...
@@ -210,10 +210,10 @@ function BDIO_write!(fb::BDIOstream,data,hash::Bool=true)
...
@@ -210,10 +210,10 @@ function BDIO_write!(fb::BDIOstream,data,hash::Bool=true)
end
end
"""
"""
Write the `MD5` checksum of the actual record as a new record.
BDIO_write_hash!(fb::BDIOstream)
BDIO_write_hash!(fb::BDIOstream)
Write the `MD5` checksum of the actual record as a new record.
## Arguments
## Arguments
- `fb`: A `BDIOstream` type. It must be associated with a file in either `w` or `a` mode.
- `fb`: A `BDIOstream` type. It must be associated with a file in either `w` or `a` mode.
...
@@ -241,10 +241,10 @@ function BDIO_write_hash!(fb)
...
@@ -241,10 +241,10 @@ function BDIO_write_hash!(fb)
end
end
"""
"""
Move the read position backward/forward `icnt` records
BDIO_seek!(fb::BDIOstream, icnt::Int = 1)
BDIO_seek!(fb::BDIOstream, icnt::Int = 1)
Move the read position backward/forward `icnt` records
## Arguments
## Arguments
- `fb`: A BDIOstream type. It must be associated with a file.
- `fb`: A BDIOstream type. It must be associated with a file.
- `icnt` (optional): number of records to move forward (if `icnt>0`) or backwards (`icnt<0`). If `icnt=0` move to the first record. The default value is `+1`.
- `icnt` (optional): number of records to move forward (if `icnt>0`) or backwards (`icnt<0`). If `icnt=0` move to the first record. The default value is `+1`.
...
@@ -254,7 +254,7 @@ Move the read position backward/forward `icnt` records
...
@@ -254,7 +254,7 @@ Move the read position backward/forward `icnt` records
julia> # count number of records in a file.
julia> # count number of records in a file.
julia> fb = BDIO_open("randoms.bdio", "r")
julia> fb = BDIO_open("randoms.bdio", "r")
julia> count = 0
julia> count = 0
julia> while BDIO_seek(fb)
julia> while BDIO_seek!(fb)
julia> count += 1
julia> count += 1
julia> end
julia> end
```
```
...
@@ -277,10 +277,10 @@ function BDIO_seek!(fb::BDIOstream, icnt::Int = 1)
...
@@ -277,10 +277,10 @@ function BDIO_seek!(fb::BDIOstream, icnt::Int = 1)