MCPcopy Create free account
hub / github.com/cinder/Cinder / readWriteFileStream

Function readWriteFileStream

src/cinder/Stream.cpp:699–713  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

697}
698
699IoStreamFileRef readWriteFileStream( const fs::path &path )
700{
701#if defined( CINDER_MSW )
702 FILE *f = _wfopen( expandPath( path ).wstring().c_str(), L"w+b" );
703#else
704 FILE *f = fopen( expandPath( path ).string().c_str(), "w+b" );
705#endif
706 if( f ) {
707 IoStreamFileRef s = IoStreamFile::create( f, true );
708 s->setFileName( path );
709 return s;
710 }
711 else
712 return IoStreamFileRef();
713}
714
715void loadStreamMemory( IStreamRef is, std::shared_ptr<uint8_t> *resultData, size_t *resultDataSize )
716{

Callers 1

Calls 5

expandPathFunction · 0.85
wstringMethod · 0.80
createFunction · 0.50
c_strMethod · 0.45
stringMethod · 0.45

Tested by

no test coverage detected