{"id":348,"date":"2024-10-04T14:28:34","date_gmt":"2024-10-04T13:28:34","guid":{"rendered":"http:\/\/monkey.ploogie.co.uk\/?page_id=348"},"modified":"2026-01-12T11:12:08","modified_gmt":"2026-01-12T11:12:08","slug":"included-file-functions","status":"publish","type":"page","link":"https:\/\/monkey.ploogie.co.uk\/index.php\/included-file-functions\/","title":{"rendered":"Included File Functions"},"content":{"rendered":"<p>Mwnci file functions that are not part of the builtin functions can be loaded with<\/p>\n<pre>include(\"file\")<\/pre>\n<h2>Functions<\/h2>\n<div class=\"table-wrap\">\n<table class=\"confluenceTable\">\n<tbody>\n<tr>\n<td class=\"confluenceTd\"><strong>Command<\/strong><\/td>\n<td class=\"confluenceTd\"><strong>Definition<\/strong><\/td>\n<\/tr>\n<tr>\n<td class=\"confluenceTd\" colspan=\"1\"><a class=\"conf-macro output-inline\" href=\"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-filetype-function\/\" data-macro-name=\"sp-nobody-link\" data-hasbody=\"false\">filetype()<\/a><\/td>\n<td class=\"confluenceTd\" colspan=\"1\">Returns the type of file of a given path<\/td>\n<\/tr>\n<tr>\n<td class=\"confluenceTd\" colspan=\"1\"><a class=\"conf-macro output-inline\" href=\"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-isblock-function\/\" data-macro-name=\"sp-nobody-link\" data-hasbody=\"false\">isblock()<\/a><\/td>\n<td class=\"confluenceTd\" colspan=\"1\">Returns <em>true<\/em> if the named file is a block device.<\/td>\n<\/tr>\n<tr>\n<td class=\"confluenceTd\" colspan=\"1\"><a class=\"conf-macro output-inline\" href=\"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-ischr-function\/\" data-macro-name=\"sp-nobody-link\" data-hasbody=\"false\">ischr()<\/a><\/td>\n<td class=\"confluenceTd\" colspan=\"1\">Returns <em>true<\/em> if the named file is a character device.<\/td>\n<\/tr>\n<tr>\n<td class=\"confluenceTd\" colspan=\"1\"><a class=\"conf-macro output-inline\" href=\"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-isdir-function\/\" data-macro-name=\"sp-nobody-link\" data-hasbody=\"false\">isdir()<\/a><\/td>\n<td class=\"confluenceTd\" colspan=\"1\">Returns <em>true<\/em> if the named file is a directory.<\/td>\n<\/tr>\n<tr>\n<td class=\"confluenceTd\" colspan=\"1\"><a class=\"conf-macro output-inline\" href=\"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-isempty-function\/\" data-macro-name=\"sp-nobody-link\" data-hasbody=\"false\">isempty()<\/a><\/td>\n<td class=\"confluenceTd\" colspan=\"1\">Returns <em>true<\/em> if the named file is empty.<\/td>\n<\/tr>\n<tr>\n<td class=\"confluenceTd\" colspan=\"1\"><a class=\"conf-macro output-inline\" href=\"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-isequal-function\/\" data-macro-name=\"sp-nobody-link\" data-hasbody=\"false\">isequal()<\/a><\/td>\n<td class=\"confluenceTd\" colspan=\"1\">Returns <em>true<\/em> the first named file has the same inode and on the same device as the second named file.<\/td>\n<\/tr>\n<tr>\n<td class=\"confluenceTd\" colspan=\"1\"><a class=\"conf-macro output-inline\" href=\"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-isexec-function\/\" data-macro-name=\"sp-nobody-link\" data-hasbody=\"false\">isexec()<\/a><\/td>\n<td class=\"confluenceTd\" colspan=\"1\">Returns <em>true<\/em> if the named file is executable by the requesting user.<\/td>\n<\/tr>\n<tr>\n<td class=\"confluenceTd\" colspan=\"1\"><a class=\"conf-macro output-inline\" href=\"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-isexist-function\/\" data-macro-name=\"sp-nobody-link\" data-hasbody=\"false\">isexist()<\/a><\/td>\n<td class=\"confluenceTd\" colspan=\"1\">Returns <em>true<\/em> if the named file exists.<\/td>\n<\/tr>\n<tr>\n<td class=\"confluenceTd\" colspan=\"1\"><a class=\"conf-macro output-inline\" href=\"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-isfifo-function\/\" data-macro-name=\"sp-nobody-link\" data-hasbody=\"false\">isfifo()<\/a><\/td>\n<td class=\"confluenceTd\" colspan=\"1\">Returns<em> true<\/em> if the named file is a named pipe.<\/td>\n<\/tr>\n<tr>\n<td class=\"confluenceTd\" colspan=\"1\"><a class=\"conf-macro output-inline\" href=\"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-isfile-function\/\" data-macro-name=\"sp-nobody-link\" data-hasbody=\"false\">isfile()<\/a><\/td>\n<td class=\"confluenceTd\" colspan=\"1\">Returns <em>true<\/em> if the named file is a regular file.<\/td>\n<\/tr>\n<tr>\n<td class=\"confluenceTd\" colspan=\"1\"><a class=\"conf-macro output-inline\" href=\"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-isgroup-function\/\" data-macro-name=\"sp-nobody-link\" data-hasbody=\"false\">isgroup()<\/a><\/td>\n<td class=\"confluenceTd\" colspan=\"1\">Returns <em>true<\/em> if the named file owned by the given group.<\/td>\n<\/tr>\n<tr>\n<td class=\"confluenceTd\" colspan=\"1\"><a class=\"conf-macro output-inline\" href=\"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-islink-function\/\" data-macro-name=\"sp-nobody-link\" data-hasbody=\"false\">islink()<\/a><\/td>\n<td class=\"confluenceTd\" colspan=\"1\">Returns <em>true<\/em> if the named file is a symbolic link.<\/td>\n<\/tr>\n<tr>\n<td class=\"confluenceTd\" colspan=\"1\"><a class=\"conf-macro output-inline\" href=\"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-isnewer-function\/\" data-macro-name=\"sp-nobody-link\" data-hasbody=\"false\">isnewer()<\/a><\/td>\n<td class=\"confluenceTd\" colspan=\"1\">Returns <em>true<\/em> if the first named file is newer than the second.<\/td>\n<\/tr>\n<tr>\n<td class=\"confluenceTd\" colspan=\"1\"><a class=\"conf-macro output-inline\" href=\"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-isolder-function\/\" data-macro-name=\"sp-nobody-link\" data-hasbody=\"false\">isolder()<\/a><\/td>\n<td class=\"confluenceTd\" colspan=\"1\">Returns <em>true<\/em> if the named file is older than the second file.<\/td>\n<\/tr>\n<tr>\n<td class=\"confluenceTd\" colspan=\"1\"><a class=\"conf-macro output-inline\" href=\"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-isowner-function\/\" data-macro-name=\"sp-nobody-link\" data-hasbody=\"false\">isowner()<\/a><\/td>\n<td class=\"confluenceTd\" colspan=\"1\">Returns <em>true<\/em> if the named file is owned by the named user.<\/td>\n<\/tr>\n<tr>\n<td class=\"confluenceTd\" colspan=\"1\"><a class=\"conf-macro output-inline\" href=\"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-issetgid-function\/\" data-macro-name=\"sp-nobody-link\" data-hasbody=\"false\">issetgid()<\/a><\/td>\n<td class=\"confluenceTd\" colspan=\"1\">Returns <em>true<\/em> if the named file has the gid bit set.<\/td>\n<\/tr>\n<tr>\n<td class=\"confluenceTd\" colspan=\"1\"><a class=\"conf-macro output-inline\" href=\"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-issetuid-function\/\" data-macro-name=\"sp-nobody-link\" data-hasbody=\"false\">issetuid()<\/a><\/td>\n<td class=\"confluenceTd\" colspan=\"1\">Returns <em>true<\/em> if the named file has the uid bit set.<\/td>\n<\/tr>\n<tr>\n<td class=\"confluenceTd\" colspan=\"1\"><a class=\"conf-macro output-inline\" href=\"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-issock-function\/\" data-macro-name=\"sp-nobody-link\" data-hasbody=\"false\">issock()<\/a><\/td>\n<td class=\"confluenceTd\" colspan=\"1\">Returns <em>true<\/em> if the named file is a socket.<\/td>\n<\/tr>\n<tr>\n<td class=\"confluenceTd\" colspan=\"1\"><a class=\"conf-macro output-inline\" href=\"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-issticky-function\/\" data-macro-name=\"sp-nobody-link\" data-hasbody=\"false\">issticky()<\/a><\/td>\n<td class=\"confluenceTd\" colspan=\"1\">Returns <em>true<\/em> if the named file has the sticky bit set.<\/td>\n<\/tr>\n<tr>\n<td class=\"confluenceTd\" colspan=\"1\"><a class=\"conf-macro output-inline\" href=\"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-writetofile-function\/\" data-macro-name=\"sp-nobody-link\" data-hasbody=\"false\">writetofile()<\/a><\/td>\n<td class=\"confluenceTd\" colspan=\"1\">Writes a string, hash or array to the named file, overwriting previous content.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Mwnci file functions that are not part of the builtin functions can be loaded with include(&#8220;file&#8221;) Functions Command Definition filetype() Returns the type of file of a given path isblock() Returns true if the named file is a block device. ischr() Returns true if the named file is a character device. isdir() Returns true if &hellip; <a href=\"https:\/\/monkey.ploogie.co.uk\/index.php\/included-file-functions\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Included File Functions&#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-348","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/348","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=348"}],"version-history":[{"count":13,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/348\/revisions"}],"predecessor-version":[{"id":1298,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/348\/revisions\/1298"}],"wp:attachment":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/media?parent=348"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}