{"id":2736,"date":"2012-04-26T06:26:22","date_gmt":"2012-04-26T06:26:22","guid":{"rendered":"http:\/\/phpcodez.com\/?p=2736"},"modified":"2012-04-26T06:26:22","modified_gmt":"2012-04-26T06:26:22","slug":"filesystem-functions","status":"publish","type":"post","link":"http:\/\/phpcodez.com\/filesystem-functions\/","title":{"rendered":"Filesystem functions"},"content":{"rendered":"<ul>\n<li><a href=\"http:\/\/phpcodez.com\/basename\">basename<\/a> &#8211;\u00a0It returns trailing name component of path<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/chgrp\">chgrp<\/a> &#8211;\u00a0It can be used to change file group<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/chmod\">chmod<\/a> &#8211;\u00a0It can be used to change file permission<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/chown\">chown<\/a> &#8211;\u00a0It can be used to change file ownership<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/clearstatcache\">clearstatcache<\/a> &#8211;\u00a0It can be used to clears file status cache<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/copy\">copy<\/a> &#8211;\u00a0It can be used to copy file<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/delete\">delete<\/a> &#8211;\u00a0Check unlink() or unset()<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/dirname\">dirname<\/a> &#8211;\u00a0It returns parent directory&#8217;s path<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/disk_free_space\">disk_free_space<\/a> &#8211;\u00a0It returns available space on filesystem or disk partition<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/disk_total_space\">disk_total_space<\/a> &#8211;\u00a0It returns the total size of a filesystem or disk partitio<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/diskfreespace\">diskfreespace<\/a> &#8211;\u00a0Its an alias of\u00a0<a href=\"http:\/\/phpcodez.com\/disk_free_space\">disk_free_space()<\/a><\/li>\n<li><a href=\"http:\/\/phpcodez.com\/fclose\">fclose<\/a> &#8211;\u00a0It closes an open file pointer<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/feof\">feof<\/a> &#8211;\u00a0It checks for end-of-file on a file pointer<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/fflush\">fflush<\/a> &#8211;\u00a0It flushes the output to a file<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/fgetc\">fgetc<\/a> &#8211;\u00a0It returns character from file pointer<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/fgetcsv\">fgetcsv<\/a> &#8211;\u00a0It returns line from file pointer and parse for CSV fields<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/fgets\">fgets<\/a> &#8211;\u00a0It returns line from file pointer<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/fgetss\">fgetss<\/a> &#8211;\u00a0It returns line from file pointer and strip HTML tags<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/file_exists\">file_exists<\/a> &#8211;\u00a0It checks whether a file or directory exists<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/file_get_contents\">file_get_contents<\/a> &#8211;\u00a0It reads entire file<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/file_put_contents\">file_put_contents<\/a> &#8211;\u00a0It writes a string to a file<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/file\">file<\/a> &#8211;\u00a0It reads entire file into an array<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/fileatime\">fileatime<\/a> &#8211;\u00a0It returns last access time of file<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/filectime\">filectime<\/a> &#8211;\u00a0It returns inode change time of file<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/filegroup\">filegroup<\/a> &#8211;\u00a0It returns file group<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/fileinode\">fileinode<\/a> &#8211;\u00a0It returns file inode<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/filemtime\">filemtime<\/a> &#8211;\u00a0It returns file modification time<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/fileowner\">fileowner<\/a> &#8211;\u00a0It returns \u00a0file owner<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/fileperms\">fileperms<\/a> &#8211;\u00a0It returns \u00a0file permissions<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/filesize\">filesize<\/a> &#8211;\u00a0It returns \u00a0file size<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/filetype\">filetype<\/a> &#8211;\u00a0It returns \u00a0file type<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/flock\">flock<\/a> &#8211;\u00a0It can be used to lock the file<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/fnmatch\">fnmatch<\/a> &#8211;\u00a0Match filename against a pattern<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/fopen\">fopen<\/a> &#8211;\u00a0It opens file or URL<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/fpassthru\">fpassthru<\/a> &#8211;\u00a0It outputs all remaining data on a file pointer<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/fputcsv\">fputcsv<\/a> &#8211;\u00a0It format line as CSV and write to file pointer<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/fputs\">fputs<\/a> &#8211;\u00a0Its an \u00a0alias of fwrite() and writes to a file<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/fread\">fread<\/a> &#8211;\u00a0It can be used to read the content from a file<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/fscanf\">fscanf<\/a> &#8211;\u00a0It parses input from a file according to a format<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/fseek\">fseek<\/a> &#8211;\u00a0It seeks on a file pointer<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/fstat\">fstat<\/a> &#8211;\u00a0It returns information about a file using an open file pointer<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/ftell\">ftell<\/a> &#8211;\u00a0It returns the current position of the file pointer<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/ftruncate\">ftruncate<\/a> &#8211;\u00a0It truncates a file to a given length<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/fwrite\">fwrite<\/a> &#8211;\u00a0It writes the string to a file<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/glob\">glob<\/a> &#8211;\u00a0It finds pathnames matching a pattern<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/is_dir\">is_dir<\/a> &#8211;\u00a0It checks whether the filename is a directory<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/is_executable\">is_executable<\/a> &#8211;\u00a0It checks whether the filename is executable<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/is_file\">is_file<\/a> &#8211;\u00a0It checks whether the filename is a regular file<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/is_link\">is_link<\/a> &#8211;\u00a0It checks whether the filename is a symbolic link<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/is_readable\">is_readable<\/a> &#8211;\u00a0It checks whether the file exists and is readable<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/is_uploaded_file\">is_uploaded_file<\/a> &#8211;\u00a0It checks whether the file was uploaded via HTTP POST<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/is_writable\">is_writable<\/a> &#8211;\u00a0It checks whether \u00a0the filename is writable<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/is_writeable\">is_writeable<\/a> &#8211;\u00a0Its an Alias of is_writable() and \u00a0checks whether \u00a0the filename is writable<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/lchgrp\">lchgrp<\/a> &#8211;\u00a0It changes group ownership of symlink<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/lchown\">lchown<\/a> &#8211;\u00a0It changes user ownership of symlink<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/link\">link<\/a> &#8211;\u00a0It creates a hard link<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/linkinfo\">linkinfo<\/a> &#8211;\u00a0It returns information about a link<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/lstat\">lstat<\/a> &#8211;\u00a0It returns information about a file or symbolic link<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/mkdir\">mkdir<\/a> &#8211;\u00a0It can be used to create directory<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/move_uploaded_file\">move_uploaded_file<\/a> &#8211;\u00a0It moves an uploaded file to a new location<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/parse_ini_file\">parse_ini_file<\/a> &#8211;\u00a0It parses a configuration file<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/parse_ini_string\">parse_ini_string<\/a> &#8211;\u00a0It parse a configuration string<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/pathinfo\">pathinfo<\/a> &#8211;\u00a0It returns information about a file path<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/pclose\">pclose<\/a> &#8211;\u00a0It closes process file pointer<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/popen\">popen<\/a> &#8211;\u00a0It opens process file pointer<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/readfile\">readfile<\/a> &#8211;\u00a0It outputs a file<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/readlink\">readlink<\/a> &#8211;\u00a0It returns the target of a symbolic link<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/realpath_cache_get\">realpath_cache_get<\/a>\u00a0&#8211;\u00a0It returns realpath cache entries<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/realpath_cache_size\">realpath_cache_size<\/a> &#8211;\u00a0It returns realpath cache size<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/realpath\">realpath<\/a> &#8211;\u00a0It returns canonicalized absolute pathname<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/rename\">rename<\/a>\u00a0&#8211;\u00a0It renames a file or directory<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/rewind\">rewind<\/a> &#8211;\u00a0It rewinds the position of a file pointer<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/rmdir\">rmdir<\/a> &#8211;\u00a0It can be used to remove a directory<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/set_file_buffer\">set_file_buffer<\/a> &#8211;\u00a0Its an alias of <a href=\"http:\/\/phpcodez.com\/stream_set_write_buffer\">stream_set_write_buffer()<\/a><\/li>\n<li><a href=\"http:\/\/phpcodez.com\/stat\">stat<\/a> &#8211;\u00a0It returns information about a file<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/symlink\">symlink<\/a> &#8211;\u00a0It creates a symbolic link<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/tempnam\">tempnam<\/a> &#8211;\u00a0It create file with unique file name<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/tmpfile\">tmpfile<\/a> &#8211;\u00a0It creates a temporary file<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/touch\">touch<\/a> &#8211;\u00a0It sets access and modification time of file<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/umask\">umask<\/a> &#8211;\u00a0It changes file permissions of file<\/li>\n<li><a href=\"http:\/\/phpcodez.com\/unlink\">unlink<\/a> &#8211;\u00a0It deletes the file<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>basename &#8211;\u00a0It returns trailing name component of path chgrp &#8211;\u00a0It can be used to change file group chmod &#8211;\u00a0It can be used to change file permission chown &#8211;\u00a0It can be used to change file ownership clearstatcache &#8211;\u00a0It can be used to clears file status cache copy &#8211;\u00a0It can be used to copy file delete &#8211;\u00a0Check &hellip; <a href=\"http:\/\/phpcodez.com\/filesystem-functions\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Filesystem functions<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25],"tags":[198,213,370],"class_list":["post-2736","post","type-post","status-publish","format-standard","hentry","category-php","tag-file","tag-functions","tag-php"],"_links":{"self":[{"href":"http:\/\/phpcodez.com\/wp-json\/wp\/v2\/posts\/2736","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/phpcodez.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/phpcodez.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/phpcodez.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/phpcodez.com\/wp-json\/wp\/v2\/comments?post=2736"}],"version-history":[{"count":0,"href":"http:\/\/phpcodez.com\/wp-json\/wp\/v2\/posts\/2736\/revisions"}],"wp:attachment":[{"href":"http:\/\/phpcodez.com\/wp-json\/wp\/v2\/media?parent=2736"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/phpcodez.com\/wp-json\/wp\/v2\/categories?post=2736"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/phpcodez.com\/wp-json\/wp\/v2\/tags?post=2736"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}