{"id":1458,"date":"2023-08-25T14:47:25","date_gmt":"2023-08-25T13:47:25","guid":{"rendered":"https:\/\/ibex.tech\/c\/?p=1458"},"modified":"2026-06-17T09:25:03","modified_gmt":"2026-06-17T08:25:03","slug":"working-with-paths","status":"publish","type":"post","link":"https:\/\/ibex.tech\/c\/c\/stream\/working-with-paths","title":{"rendered":"Working with paths"},"content":{"rendered":"\n<h4 class=\"wp-block-heading\">Dynamic filename path<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>#define USB_DRIVE_MOUNT_POINT \"\/usb\"\n\n#define\tUSB_MAX_FILEPATH_LENGTH\t\t\t\t30\n\nstatic char FilePathBuffer&#91;USB_MAX_FILEPATH_LENGTH];\n\n\/\/*******************************************\n\/\/*******************************************\n\/\/********** CREATE FULL FILE PATH **********\n\/\/*******************************************\n\/\/*******************************************\n\/\/Accessing the USB drive needs \"\/usb\" adding in front of the filename\n\/\/This function does that and stores it in FilePathBuffer&#91;], returning a pointer to the start of it.\nchar *UsbDriveFullFilePath(char *pFilename)\n{\n\tchar *pFullFilePath;\n\n\t\/\/COMBINE USERS FILENAME WITH OUR USB_DRIVE_MOUNT_POINT\n\tpFullFilePath = (char*)&amp;FilePathBuffer&#91;0];\n\tpFullFilePath = CopyRamCharStringToRam((const char*)USB_DRIVE_MOUNT_POINT, pFullFilePath, &amp;FilePathBuffer&#91;(USB_MAX_FILEPATH_LENGTH-1)]);\n\t*pFullFilePath++ = '\/';\n\tpFullFilePath = CopyRamCharStringToRam((const char*)pFilename, pFullFilePath, &amp;FilePathBuffer&#91;(USB_MAX_FILEPATH_LENGTH - 1)]);\n\n\treturn((char*)&amp;FilePathBuffer&#91;0]);\n}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Dynamic filename path<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[114],"tags":[],"class_list":["post-1458","post","type-post","status-publish","format-standard","hentry","category-stream"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/c\/wp-json\/wp\/v2\/posts\/1458","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibex.tech\/c\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibex.tech\/c\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibex.tech\/c\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/ibex.tech\/c\/wp-json\/wp\/v2\/comments?post=1458"}],"version-history":[{"count":6,"href":"https:\/\/ibex.tech\/c\/wp-json\/wp\/v2\/posts\/1458\/revisions"}],"predecessor-version":[{"id":1613,"href":"https:\/\/ibex.tech\/c\/wp-json\/wp\/v2\/posts\/1458\/revisions\/1613"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/c\/wp-json\/wp\/v2\/media?parent=1458"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/c\/wp-json\/wp\/v2\/categories?post=1458"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/c\/wp-json\/wp\/v2\/tags?post=1458"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}