Veritable Lasagna
An Allocator & Data Structure Library for C.
Loading...
Searching...
No Matches
vl_stream_filesys.h File Reference
#include <vl/vl_filesys.h>
#include <vl/vl_stream.h>
+ Include dependency graph for vl_stream_filesys.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

VL_API vl_streamvlStreamOpenFileStr (vl_filesys *sys, const char *pathStr, const char *mode)
 Opens a file stream using a raw UTF-8 string path.
 

Function Documentation

◆ vlStreamOpenFileStr()

VL_API vl_stream * vlStreamOpenFileStr ( vl_filesys sys,
const char *  pathStr,
const char *  mode 
)

Opens a file stream using a raw UTF-8 string path.

This is a convenience wrapper that creates a temporary path object if needed to handle platform-specific encoding conversion.

Contract

  • Ownership: The caller owns the returned vl_stream pointer.
  • Lifetime: The stream is valid until its reference count reaches zero.
  • Thread Safety: Thread-safe.
  • Nullability: Returns NULL if pathStr or mode is NULL. sys can be NULL.
  • Error Conditions: Same as vlStreamOpenFile.
  • Undefined Behavior: None.
  • Memory Allocation Expectations: Same as vlStreamOpenFile.
  • Return-value Semantics: Returns a pointer to the new stream, or NULL if failure.
Parameters
sysThe filesystem context (can be NULL if not using arena/pool features for this op).
pathStrThe UTF-8 path string.
modeThe standard C fopen mode string.
Returns
A new stream object, or NULL if failure.
+ Here is the call graph for this function: