diff --git a/doc/APIreference/functions.rst b/doc/APIreference/functions.rst index 7ef7d097d3..2af76833b4 100644 --- a/doc/APIreference/functions.rst +++ b/doc/APIreference/functions.rst @@ -1504,6 +1504,9 @@ Unmount a previously mounted ResourceProvider; return 0: success, -1: not found Add file to VFS. The directory argument is optional and can be NULL or empty. Returns 0 on success, 2 on name collision, or -1 when an internal error occurs. +VFS first attempts to match a full path. If this fails, it falls back to a case-insensitive match on +the basename. For example, an entry named ``assets/Cube.OBJ`` can be found as ``cube.obj``. + *Nullable:* ``directory`` .. _mj_addBufferVFS: @@ -1515,6 +1518,9 @@ Add file to VFS. The directory argument is optional and can be NULL or empty. Re Add file to VFS from buffer; return 0: success, 2: repeated name, -1: failed to load. +VFS first attempts to match a full path. If this fails, it falls back to a case-insensitive match on +the basename. For example, an entry named ``assets/Cube.OBJ`` can be found as ``cube.obj``. + .. _mj_deleteFileVFS: `mj_deleteFileVFS <#mj_deleteFileVFS>`__ diff --git a/doc/APIreference/functions_override.rst b/doc/APIreference/functions_override.rst index 9290a5623a..c72a749e92 100644 --- a/doc/APIreference/functions_override.rst +++ b/doc/APIreference/functions_override.rst @@ -23,8 +23,18 @@ Initialize an empty VFS, :ref:`mj_deleteVFS` must be called to deallocate the VF Add file to VFS. The directory argument is optional and can be NULL or empty. Returns 0 on success, 2 on name collision, or -1 when an internal error occurs. +VFS first attempts to match a full path. If this fails, it falls back to a case-insensitive match on +the basename. For example, an entry named ``assets/Cube.OBJ`` can be found as ``cube.obj``. + *Nullable:* ``directory`` +.. _mj_addBufferVFS: + +Add file to VFS from buffer; return 0: success, 2: repeated name, -1: failed to load. + +VFS first attempts to match a full path. If this fails, it falls back to a case-insensitive match on +the basename. For example, an entry named ``assets/Cube.OBJ`` can be found as ``cube.obj``. + .. _Assetcache: The asset cache is a mechanism for caching assets (e.g. textures, meshes, etc.) to avoid repeated slow recompilation.