Php file system functions

Source: Internet
Author: User
PHP extension-related file system functions

Directory functions

Chdir-Change Directory

Chroot-change root directory

Closedir-close directory handle

Dir-Return an instance of the Directory class

Getcwd-get the current working directory

Opendir-Open Directory handle

Readdir-read entries from the directory handle

Rewinddir-reverse directory handle

Scandir-list files and directories in a specified path

FileSystem functions

Basename-part of the file name in the returned path

Chgrp-change the group to which the file belongs

Chmod-change file mode

Chown-change the file owner

Clearstatcache-clear the file status cache

Copy-copy an object

Delete-see unlink or unset

Dirname-directory part of the returned path

Disk_free_space-return the available space in the directory

Disk_total_space-returns the total disk size of a directory

Diskfreespace-disk_free_space alias

Fclose-close an opened file pointer

Feof-test whether the file pointer is at the end of the file

Fflush-outputs Buffered content to a file

Fgetc-read characters from the file pointer

Fgetcsv-read a row from the file pointer and parse the CSV field

Fgets-read a row from the file pointer

Fgetss-read a row from the file pointer and filter out the HTML tag

File_exists-check whether the file or directory exists

File_get_contents-read the entire file into a string

File_put_contents-write a string to a file

File-read the entire file into an array

Fileatime-the last time the file was accessed

Filectime-get the inode modification time of the file

Filegroup-the group for obtaining files

Fileinode-get the inode of the file

Filemtime-get file modification time

Fileowner-get the file owner

Fileperms-get file permissions

Filesize-get the file size

Filetype-get file type

Flock-lightweight consultation file locking

Fnmatch-match the file name in the pattern

Fopen-open a file or URL

Fpassthru-all the remaining data at the output file pointer

Fputcsv-format rows as CSV and write file pointers

Fputs-fwrite alias

Fread-read files (which can be safely used for binary files)

Fscanf-format input from file

Fseek-locate in file pointer

Fstat-get file information through the opened file pointer

Ftell-returned file pointer read/write location

Ftruncate-truncates a file to a specified length

Fwrite-write a file (which can be safely used for binary files)

Glob-find the file path that matches the pattern

Is_dir-determine whether the given file name is a directory

Is_executable-determine whether a given file name can be executed

Is_file-determine whether the given file name is a normal file

Is_link-determine whether a given file name is a symbolic connection

Is_readable-determine whether the given file name is readable

Is_uploaded_file-determines whether the file is uploaded through http post.

Is_writable-determine whether a given file name can be written

Is_writeable-is_writable alias

Lchgrp-Changes group ownership of symlink

Lchown-Changes user ownership of symlink

Link-create a hard connection

Linkinfo-get the connection information

Lstat-displays information about a file or symbolic connection.

Mkdir-create a directory

Move_uploaded_file-move the uploaded file to a new location

Parse_ini_file-parse a configuration file

Parse_ini_string-Parse a configuration string

Pathinfo-returned file path information

Pclose-disable process file pointer

Popen-open process file pointer

Readfile-output a file

Readlink-returns the target to which the symbolic connection points.

Realpath_cache_get-Get realpath cache entries

Realpath_cache_size-Get realpath cache size

Realpath-returns the normalized absolute path name.

Rename-rename a file or directory

Rewind-position of the inverted file pointer

Rmdir-Delete directory

Set_file_buffer-stream_set_write_buffer alias

Stat-file information

Symlink-create a symbolic connection

Tempnam-create a file with a unique file name

Tmpfile-create a temporary file

Touch-set the file access and modification time

Umask-change the current umask

Unlink-delete an object

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.