MCPcopy Create free account
hub / github.com/Bloom-Engine/engine / bloom_write_file

Function bloom_write_file

native/ios/src/lib.rs:2005–2012  ·  view source on GitHub ↗
(path_ptr: *const u8, data_ptr: *const u8)

Source from the content-addressed store, hash-verified

2003
2004#[no_mangle]
2005pub extern "C" fn bloom_write_file(path_ptr: *const u8, data_ptr: *const u8) -> f64 {
2006 let path = str_from_header(path_ptr);
2007 let data = str_from_header(data_ptr);
2008 match std::fs::write(path, data.as_bytes()) {
2009 Ok(_) => 1.0,
2010 Err(_) => 0.0,
2011 }
2012}
2013
2014#[no_mangle]
2015pub extern "C" fn bloom_file_exists(path_ptr: *const u8) -> f64 {

Callers 1

writeFileFunction · 0.50

Calls 1

str_from_headerFunction · 0.85

Tested by

no test coverage detected