Title: wp-admin/includes/class-wp-filesystem-direct.php | Developer.WordPress.org

---

# File: wp-admin/includes/class-wp-filesystem-direct.php

 * method[WP_Filesystem_Direct::mkdir()](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/mkdir/)
 * Creates a directory.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/mkdir/#used-by)
   | Uses [4 functions](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/mkdir/#uses)
   | Source: [wp-admin/includes/class-wp-filesystem-direct.php:546](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-admin/includes/class-wp-filesystem-direct.php#L546-L573)
 * method[WP_Filesystem_Direct::rmdir()](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/rmdir/)
 * Deletes a directory.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/rmdir/#used-by)
   | Uses [1 function](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/rmdir/#uses)
   | Source: [wp-admin/includes/class-wp-filesystem-direct.php:585](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-admin/includes/class-wp-filesystem-direct.php#L585-L587)
 * method[WP_Filesystem_Direct::dirlist()](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/dirlist/)
 * Gets details for files in a directory or a specific file.
 * Used by [5 functions](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/dirlist/#used-by)
   | Uses [9 functions](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/dirlist/#uses)
   | Source: [wp-admin/includes/class-wp-filesystem-direct.php:624](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-admin/includes/class-wp-filesystem-direct.php#L624-L687)
 * method[WP_Filesystem_Direct::copy()](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/copy/)
 * Copies a file.
 * Used by [1 function](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/copy/#used-by)
   | Uses [2 functions](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/copy/#uses)
   | Source: [wp-admin/includes/class-wp-filesystem-direct.php:304](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-admin/includes/class-wp-filesystem-direct.php#L304-L316)
 * method[WP_Filesystem_Direct::touch()](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/touch/)
 * Sets the access and modification times of a file.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/touch/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/touch/#uses)
   | Source: [wp-admin/includes/class-wp-filesystem-direct.php:520](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-admin/includes/class-wp-filesystem-direct.php#L520-L530)
 * method[WP_Filesystem_Direct::move()](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/move/)
 * Moves a file or directory.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/move/#used-by)
   | Uses [4 functions](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/move/#uses)
   | Source: [wp-admin/includes/class-wp-filesystem-direct.php:336](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-admin/includes/class-wp-filesystem-direct.php#L336-L359)
 * method[WP_Filesystem_Direct::delete()](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/delete/)
 * Deletes a file or directory.
 * Used by [3 functions](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/delete/#used-by)
   | Uses [5 functions](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/delete/#uses)
   | Source: [wp-admin/includes/class-wp-filesystem-direct.php:373](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-admin/includes/class-wp-filesystem-direct.php#L373-L408)
 * method[WP_Filesystem_Direct::exists()](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/exists/)
 * Checks if a file or directory exists.
 * Used by [4 functions](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/exists/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/exists/#uses)
   | Source: [wp-admin/includes/class-wp-filesystem-direct.php:418](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-admin/includes/class-wp-filesystem-direct.php#L418-L420)
 * method[WP_Filesystem_Direct::is_file()](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/is_file/)
 * Checks if resource is a file.
 * Used by [4 functions](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/is_file/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/is_file/#uses)
   | Source: [wp-admin/includes/class-wp-filesystem-direct.php:430](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-admin/includes/class-wp-filesystem-direct.php#L430-L432)
 * method[WP_Filesystem_Direct::is_dir()](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/is_dir/)
 * Checks if resource is a directory.
 * Used by [5 functions](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/is_dir/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/is_dir/#uses)
   | Source: [wp-admin/includes/class-wp-filesystem-direct.php:442](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-admin/includes/class-wp-filesystem-direct.php#L442-L444)
 * method[WP_Filesystem_Direct::is_readable()](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/is_readable/)
 * Checks if a file is readable.
 * Used by [1 function](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/is_readable/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/is_readable/#uses)
   | Source: [wp-admin/includes/class-wp-filesystem-direct.php:454](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-admin/includes/class-wp-filesystem-direct.php#L454-L456)
 * method[WP_Filesystem_Direct::is_writable()](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/is_writable/)
 * Checks if a file or directory is writable.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/is_writable/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/is_writable/#uses)
   | Source: [wp-admin/includes/class-wp-filesystem-direct.php:466](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-admin/includes/class-wp-filesystem-direct.php#L466-L468)
 * method[WP_Filesystem_Direct::owner()](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/owner/)
 * Gets the file owner.
 * Used by [1 function](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/owner/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/owner/#uses)
   | Source: [wp-admin/includes/class-wp-filesystem-direct.php:229](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-admin/includes/class-wp-filesystem-direct.php#L229-L247)
 * method[WP_Filesystem_Direct::atime()](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/atime/)
 * Gets the file’s last access time.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/atime/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/atime/#uses)
   | Source: [wp-admin/includes/class-wp-filesystem-direct.php:478](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-admin/includes/class-wp-filesystem-direct.php#L478-L480)
 * method[WP_Filesystem_Direct::getchmod()](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/getchmod/)
 * Gets the permissions of the specified file or filepath in their octal format.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/getchmod/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/getchmod/#uses)
   | Source: [wp-admin/includes/class-wp-filesystem-direct.php:259](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-admin/includes/class-wp-filesystem-direct.php#L259-L261)
 * method[WP_Filesystem_Direct::mtime()](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/mtime/)
 * Gets the file modification time.
 * Used by [1 function](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/mtime/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/mtime/#uses)
   | Source: [wp-admin/includes/class-wp-filesystem-direct.php:490](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-admin/includes/class-wp-filesystem-direct.php#L490-L492)
 * method[WP_Filesystem_Direct::group()](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/group/)
 * Gets the file’s group.
 * Used by [1 function](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/group/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/group/#uses)
   | Source: [wp-admin/includes/class-wp-filesystem-direct.php:271](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-admin/includes/class-wp-filesystem-direct.php#L271-L289)
 * method[WP_Filesystem_Direct::size()](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/size/)
 * Gets the file size (in bytes).
 * Used by [1 function](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/size/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/size/#uses)
   | Source: [wp-admin/includes/class-wp-filesystem-direct.php:502](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-admin/includes/class-wp-filesystem-direct.php#L502-L504)
 * method[WP_Filesystem_Direct::get_contents_array()](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/get_contents_array/)
 * Reads entire file into an array.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/get_contents_array/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/get_contents_array/#uses)
   | Source: [wp-admin/includes/class-wp-filesystem-direct.php:50](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-admin/includes/class-wp-filesystem-direct.php#L50-L52)
 * method[WP_Filesystem_Direct::put_contents()](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/put_contents/)
 * Writes a string to a file.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/put_contents/#used-by)
   | Uses [3 functions](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/put_contents/#uses)
   | Source: [wp-admin/includes/class-wp-filesystem-direct.php:65](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-admin/includes/class-wp-filesystem-direct.php#L65-L89)
 * method[WP_Filesystem_Direct::cwd()](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/cwd/)
 * Gets the current working directory.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/cwd/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/cwd/#uses)
   | Source: [wp-admin/includes/class-wp-filesystem-direct.php:98](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-admin/includes/class-wp-filesystem-direct.php#L98-L100)
 * method[WP_Filesystem_Direct::chdir()](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/chdir/)
 * Changes current directory.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/chdir/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/chdir/#uses)
   | Source: [wp-admin/includes/class-wp-filesystem-direct.php:110](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-admin/includes/class-wp-filesystem-direct.php#L110-L112)
 * method[WP_Filesystem_Direct::chgrp()](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/chgrp/)
 * Changes the file group.
 * Used by [2 functions](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/chgrp/#used-by)
   | Uses [5 functions](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/chgrp/#uses)
   | Source: [wp-admin/includes/class-wp-filesystem-direct.php:125](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-admin/includes/class-wp-filesystem-direct.php#L125-L147)
 * method[WP_Filesystem_Direct::chmod()](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/chmod/)
 * Changes filesystem permissions.
 * Used by [4 functions](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/chmod/#used-by)
   | Uses [5 functions](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/chmod/#uses)
   | Source: [wp-admin/includes/class-wp-filesystem-direct.php:161](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-admin/includes/class-wp-filesystem-direct.php#L161-L185)
 * method[WP_Filesystem_Direct::chown()](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/chown/)
 * Changes the owner of a file or directory.
 * Used by [2 functions](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/chown/#used-by)
   | Uses [4 functions](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/chown/#uses)
   | Source: [wp-admin/includes/class-wp-filesystem-direct.php:198](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-admin/includes/class-wp-filesystem-direct.php#L198-L219)
 * class[WP_Filesystem_Direct](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/)
 * WordPress Filesystem Class for direct PHP file and folder manipulation.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/#used-by)
   | Uses [1 function](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/#uses)
   | Source: [wp-admin/includes/class-wp-filesystem-direct.php:16](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-admin/includes/class-wp-filesystem-direct.php#L16-L688)
 * method[WP_Filesystem_Direct::__construct()](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/__construct/)
 * Constructor.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/__construct/#used-by)
   | Uses [1 function](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/__construct/#uses)
   | Source: [wp-admin/includes/class-wp-filesystem-direct.php:25](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-admin/includes/class-wp-filesystem-direct.php#L25-L28)
 * method[WP_Filesystem_Direct::get_contents()](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/get_contents/)
 * Reads entire file into a string.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/get_contents/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wp_filesystem_direct/get_contents/#uses)
   | Source: [wp-admin/includes/class-wp-filesystem-direct.php:38](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-admin/includes/class-wp-filesystem-direct.php#L38-L40)