{"id":1448,"date":"2023-08-25T14:32:06","date_gmt":"2023-08-25T13:32:06","guid":{"rendered":"https:\/\/ibex.tech\/c\/?p=1448"},"modified":"2023-08-25T14:34:24","modified_gmt":"2023-08-25T13:34:24","slug":"working-with-directories","status":"publish","type":"post","link":"https:\/\/ibex.tech\/c\/c\/stream\/working-with-directories","title":{"rendered":"Working with directories"},"content":{"rendered":"\n<h4 class=\"wp-block-heading\">Does directory exist \/ create directory<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>\tconst char *DOWNLOAD_LOG_DIRECTORY = \"\/usb\/logdata\";\n\n\n\t\/\/----- CHECK FOR CREATE DIRECTORY -----\n\tstruct stat FileStatus = {0};\n\tif (!(stat(DOWNLOAD_LOG_DIRECTORY, &amp;FileStatus) == 0))\n\t{\n\t\tif (mkdir(DOWNLOAD_LOG_DIRECTORY, 0775) != 0)\n\t\t{\n\t\t\tESP_LOGE(TAG, \"mkdir failed with errno: %s\\n\", strerror(errno));\n\t\t}\n\t}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Does directory exist \/ create directory<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[114],"tags":[],"class_list":["post-1448","post","type-post","status-publish","format-standard","hentry","category-stream"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/c\/wp-json\/wp\/v2\/posts\/1448","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=1448"}],"version-history":[{"count":2,"href":"https:\/\/ibex.tech\/c\/wp-json\/wp\/v2\/posts\/1448\/revisions"}],"predecessor-version":[{"id":1453,"href":"https:\/\/ibex.tech\/c\/wp-json\/wp\/v2\/posts\/1448\/revisions\/1453"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/c\/wp-json\/wp\/v2\/media?parent=1448"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/c\/wp-json\/wp\/v2\/categories?post=1448"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/c\/wp-json\/wp\/v2\/tags?post=1448"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}