mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
os: deprecate os.File.write_bytes
and add os.File.write_ptr
(#9370)
This commit is contained in:
@ -340,7 +340,7 @@ pub fn write_file(path string, text string) ? {
|
||||
// write_file_array writes the data in `buffer` to a file in `path`.
|
||||
pub fn write_file_array(path string, buffer array) ? {
|
||||
mut f := create(path) ?
|
||||
unsafe { f.write_bytes_at(buffer.data, (buffer.len * buffer.element_size), 0) }
|
||||
unsafe { f.write_ptr_at(buffer.data, (buffer.len * buffer.element_size), 0) }
|
||||
f.close()
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user