Update RingRayLib - raylib.c - Add Function : const char *GetDirectoryPath(const char *fileName)
@@ -873,6 +873,20 @@ RING_FUNC(ring_GetFileNameWithoutExt)
RING_API_RETSTRING(GetFileNameWithoutExt(RING_API_GETSTRING(1)));
}
+
+RING_FUNC(ring_GetDirectoryPath)
+{
+ if ( RING_API_PARACOUNT != 1 ) {
+ RING_API_ERROR(RING_API_MISS1PARA);
+ return ;
+ }
+ if ( ! RING_API_ISSTRING(1) ) {
+ RING_API_ERROR(RING_API_BADPARATYPE);
+ return ;
+ }
+ RING_API_RETSTRING(GetDirectoryPath(RING_API_GETSTRING(1)));
+}
+
RING_API void ringlib_init(RingState *pRingState)
{
ring_vm_funcregister("initwindow",ring_InitWindow);
@@ -941,4 +955,5 @@ RING_API void ringlib_init(RingState *pRingState)
ring_vm_funcregister("getextension",ring_GetExtension);
ring_vm_funcregister("getfilename",ring_GetFileName);
ring_vm_funcregister("getfilenamewithoutext",ring_GetFileNameWithoutExt);
+ ring_vm_funcregister("getdirectorypath",ring_GetDirectoryPath);
}
