| [ Index ] | 
		    WordPress Cross Reference | 
    
[Source view] [Print] [Project Stats]
Base WordPress Filesystem
| File Size: | 763 lines (21 kb) | 
| Included or required: | 1 time | 
| Referenced: | 0 times | 
| Includes or requires: | 0 files | 
WP_Filesystem_Base:: (39 methods):
  __construct()
  abspath()
  wp_content_dir()
  wp_plugins_dir()
  wp_themes_dir()
  wp_lang_dir()
  find_base_dir()
  get_base_dir()
  find_folder()
  search_for_folder()
  gethchmod()
  getnumchmodfromh()
  is_binary()
  chown()
  connect()
  get_contents()
  get_contents_array()
  put_contents()
  cwd()
  chdir()
  chgrp()
  chmod()
  owner()
  group()
  copy()
  move()
  delete()
  exists()
  is_file()
  is_dir()
  is_readable()
  is_writable()
  atime()
  mtime()
  size()
  touch()
  mkdir()
  rmdir()
  dirlist()
Class: WP_Filesystem_Base - X-Ref
Base WordPress Filesystem class for which Filesystem implementations extend| __construct() X-Ref | 
| Constructor (empty). | 
| abspath() X-Ref | 
| Return the path on the remote filesystem of ABSPATH. return: string The location of the remote path.  | 
| wp_content_dir() X-Ref | 
| Return the path on the remote filesystem of WP_CONTENT_DIR. return: string The location of the remote path.  | 
| wp_plugins_dir() X-Ref | 
| Return the path on the remote filesystem of WP_PLUGIN_DIR. return: string The location of the remote path.  | 
| wp_themes_dir( $theme = false ) X-Ref | 
| Return the path on the remote filesystem of the Themes Directory. param: string $theme The Theme stylesheet or template for the directory. return: string The location of the remote path.  | 
| wp_lang_dir() X-Ref | 
| Return the path on the remote filesystem of WP_LANG_DIR. return: string The location of the remote path.  | 
| find_base_dir( $base = '.', $echo = false ) X-Ref | 
| Locate a folder on the remote filesystem. param: string $base The folder to start searching from. param: bool $echo True to display debug information. return: string The location of the remote path.  | 
| get_base_dir( $base = '.', $echo = false ) X-Ref | 
| Locate a folder on the remote filesystem. param: string $base The folder to start searching from. param: bool $echo True to display debug information. return: string The location of the remote path.  | 
| find_folder( $folder ) X-Ref | 
| Locate a folder on the remote filesystem. Assumes that on Windows systems, Stripping off the Drive letter is OK Sanitizes \\ to / in windows filepaths. param: string $folder the folder to locate. return: string The location of the remote path.  | 
| search_for_folder( $folder, $base = '.', $loop = false ) X-Ref | 
| Locate a folder on the remote filesystem. Expects Windows sanitized path. param: string $folder The folder to locate. param: string $base The folder to start searching from. param: bool $loop If the function has recursed, Internal use only. return: string The location of the remote path.  | 
| gethchmod( $file ) X-Ref | 
| Return the *nix-style file permissions for a file. From the PHP documentation page for fileperms(). param: string $file String filename. return: string The *nix-style representation of permissions.  | 
| getnumchmodfromh( $mode ) X-Ref | 
| Convert *nix-style file permissions to a octal number. Converts '-rw-r--r--' to 0644 From "info at rvgate dot nl"'s comment on the PHP documentation for chmod() param: string $mode string The *nix-style file permission. return: int octal representation  | 
| is_binary( $text ) X-Ref | 
| Determine if the string provided contains binary characters. param: string $text String to test against. return: bool true if string is binary, false otherwise.  | 
| chown( $file, $owner, $recursive = false ) X-Ref | 
| Change the ownership of a file / folder. Default behavior is to do nothing, override this in your subclass, if desired. param: string $file Path to the file. param: mixed $owner A user name or number. param: bool $recursive Optional. If set True changes file owner recursivly. Defaults to False. return: bool Returns true on success or false on failure.  | 
| connect() X-Ref | 
| Connect filesystem. return: bool True on success or false on failure (always true for WP_Filesystem_Direct).  | 
| get_contents( $file ) X-Ref | 
| Read entire file into a string. param: string $file Name of the file to read. return: string|bool Returns the read data or false on failure.  | 
| get_contents_array( $file ) X-Ref | 
| Read entire file into an array. param: string $file Path to the file. return: array|bool the file contents in an array or false on failure.  | 
| put_contents( $file, $contents, $mode = false ) X-Ref | 
| Write a string to a file. param: string $file Remote path to the file where to write the data. param: string $contents The data to write. param: int $mode Optional. The file permissions as octal number, usually 0644. return: bool False on failure.  | 
| cwd() X-Ref | 
| Get the current working directory. return: string|bool The current working directory on success, or false on failure.  | 
| chdir( $dir ) X-Ref | 
| Change current directory. param: string $dir The new current directory. return: bool Returns true on success or false on failure.  | 
| chgrp( $file, $group, $recursive = false ) X-Ref | 
| Change the file group. param: string $file Path to the file. param: mixed $group A group name or number. param: bool $recursive Optional. If set True changes file group recursively. Defaults to False. return: bool Returns true on success or false on failure.  | 
| chmod( $file, $mode = false, $recursive = false ) X-Ref | 
| Change filesystem permissions. param: string $file Path to the file. param: int $mode Optional. The permissions as octal number, usually 0644 for files, 0755 for dirs. param: bool $recursive Optional. If set True changes file group recursively. Defaults to False. return: bool Returns true on success or false on failure.  | 
| owner( $file ) X-Ref | 
| Get the file owner. param: string $file Path to the file. return: string|bool Username of the user or false on error.  | 
| group( $file ) X-Ref | 
| Get the file's group. param: string $file Path to the file. return: string|bool The group or false on error.  | 
| copy( $source, $destination, $overwrite = false, $mode = false ) X-Ref | 
| Copy a file. param: string $source Path to the source file. param: string $destination Path to the destination file. param: bool $overwrite Optional. Whether to overwrite the destination file if it exists. param: int $mode Optional. The permissions as octal number, usually 0644 for files, 0755 for dirs. return: bool True if file copied successfully, False otherwise.  | 
| move( $source, $destination, $overwrite = false ) X-Ref | 
| Move a file. param: string $source Path to the source file. param: string $destination Path to the destination file. param: bool $overwrite Optional. Whether to overwrite the destination file if it exists. return: bool True if file copied successfully, False otherwise.  | 
| delete( $file, $recursive = false, $type = false ) X-Ref | 
| Delete a file or directory. param: string $file Path to the file. param: bool $recursive Optional. If set True changes file group recursively. Defaults to False. param: bool $type Type of resource. 'f' for file, 'd' for directory. return: bool True if the file or directory was deleted, false on failure.  | 
| exists( $file ) X-Ref | 
| Check if a file or directory exists. param: string $file Path to file/directory. return: bool Whether $file exists or not.  | 
| is_file( $file ) X-Ref | 
| Check if resource is a file. param: string $file File path. return: bool Whether $file is a file.  | 
| is_dir( $path ) X-Ref | 
| Check if resource is a directory. param: string $path Directory path. return: bool Whether $path is a directory.  | 
| is_readable( $file ) X-Ref | 
| Check if a file is readable. param: string $file Path to file. return: bool Whether $file is readable.  | 
| is_writable( $file ) X-Ref | 
| Check if a file or directory is writable. param: string $path Path to file/directory. return: bool Whether $file is writable.  | 
| atime( $file ) X-Ref | 
| Gets the file's last access time. param: string $file Path to file. return: int Unix timestamp representing last access time.  | 
| mtime( $file ) X-Ref | 
| Gets the file modification time. param: string $file Path to file. return: int Unix timestamp representing modification time.  | 
| size( $file ) X-Ref | 
| Gets the file size (in bytes). param: string $file Path to file. return: int Size of the file in bytes.  | 
| touch( $file, $time = 0, $atime = 0 ) X-Ref | 
| Set the access and modification times of a file. Note: If $file doesn't exist, it will be created. param: string $file Path to file. param: int $time Optional. Modified time to set for file. param: int $atime Optional. Access time to set for file. return: bool Whether operation was successful or not.  | 
| mkdir( $path, $chmod = false, $chown = false, $chgrp = false ) X-Ref | 
| Create a directory. param: string $path Path for new directory. param: mixed $chmod Optional. The permissions as octal number, (or False to skip chmod) param: mixed $chown Optional. A user name or number (or False to skip chown) param: mixed $chgrp Optional. A group name or number (or False to skip chgrp). return: bool False if directory cannot be created, true otherwise.  | 
| rmdir( $path, $recursive = false ) X-Ref | 
| Delete a directory. param: string $path Path to directory. param: bool $recursive Optional. Whether to recursively remove files/directories. return: bool Whether directory is deleted successfully or not.  | 
| dirlist( $path, $include_hidden = true, $recursive = false ) X-Ref | 
| Get details for files in a directory or a specific file. param: string $path Path to directory or file. param: bool $include_hidden Optional. Whether to include details of hidden ("." prefixed) files. param: bool $recursive Optional. Whether to recursively include file details in nested directories. return: array|bool {  | 
| Generated: Tue Mar 25 01:41:18 2014 | WordPress honlapkészítés: online1.hu |