{"id":811,"date":"2024-11-29T13:59:30","date_gmt":"2024-11-29T13:59:30","guid":{"rendered":"http:\/\/monkey.ploogie.co.uk\/?page_id=811"},"modified":"2024-11-29T13:59:30","modified_gmt":"2024-11-29T13:59:30","slug":"mwnci-tmpnam-function","status":"publish","type":"page","link":"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-tmpnam-function\/","title":{"rendered":"Mwnci tmpnam() Function"},"content":{"rendered":"<h2>Syntax<\/h2>\n<p>tmpnm<strong>(<em>string<\/em>, <em>[string]<\/em>])<\/strong><\/p>\n<h2>Description<\/h2>\n<p>The <i>tmpnam()<\/i> function creates a new temporary file in the named directory, opens the file for reading and writing, and returns the resulting file name. A prefix can be given, which will be used as the first part of the file name.<\/p>\n<h2>Example<\/h2>\n<pre>\r\nmyfirstfile=tmpnam(\"\/tmp\")\r\nmysecondfile=tmpnam(\"\/tmp\", \"temp_file\")\r\nprintln(myfirstfile)\r\nprintln(mysecondfile)\r\nunlink(myfirstfile)\r\nunlink(mysecondfile)\r\n\r\n\r\n\/tmp\/3867638960\r\n\/tmp\/temp_file1767542531\r\n\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Syntax tmpnm(string, [string]]) Description The tmpnam() function creates a new temporary file in the named directory, opens the file for reading and writing, and returns the resulting file name. A prefix can be given, which will be used as the first part of the file name. Example myfirstfile=tmpnam(&#8220;\/tmp&#8221;) mysecondfile=tmpnam(&#8220;\/tmp&#8221;, &#8220;temp_file&#8221;) println(myfirstfile) println(mysecondfile) unlink(myfirstfile) unlink(mysecondfile) \/tmp\/3867638960 &hellip; <a href=\"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-tmpnam-function\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Mwnci tmpnam() Function&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-811","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/811","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/comments?post=811"}],"version-history":[{"count":2,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/811\/revisions"}],"predecessor-version":[{"id":813,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/811\/revisions\/813"}],"wp:attachment":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/media?parent=811"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}