[wp-hackers] easy way to request ftp credentials and use them, when directory to write is not writable?..

Otto otto at ottodestruct.com
Thu Sep 15 15:10:35 UTC 2011


On Thu, Sep 15, 2011 at 4:01 AM, Davit Barbakadze <jayarjo at gmail.com> wrote:
> I think both resources still lack a good writeup on other available
> functions.

As for other functions, they're pretty straightforward and can be
found in the source easily enough.

get_contents - get an entire file
get_contents_array - get a file but as an array of lines
put_contents - write an entire file
cwd - get the current working directory
chdir - change to another directory
chgrp - change the group of a file
chmod - change the permissions of a file
chown - change the owner of a file
owner - get the owner of a file
getchmod - get the permissions of a file
group - get the group of a file
copy
move
delete - do some obvious things to files
exists
is_file
is_dir
is_readable
is_writable - should be fairly obvious
atime - get last accessed time for a file
mtime - get last modified time for a file
size - get file size
touch
mkdir
rmdir - obvious
dirlist - get a list of directories

There's also things more specific to WP, like:

abspath - get the equivalent ABSPATH for whatever filesystem method
you're using. This may be different because you could have a different
filesystem "remotely" than you would have locally, and so this
function needs to exist to tell you where the abspath is on the remote
system.
wp_content_dir - get the remote content directory. see above.
wp_plugins_dir
wp_themes_dir
wp_lang_dir - I'm sure you get the idea.
find_folder - finds a specific folder on the remote system


-Otto


More information about the wp-hackers mailing list