[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
delete - do some obvious things to files
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
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
wp_content_dir - get the remote content directory. see above.
wp_lang_dir - I'm sure you get the idea.
find_folder - finds a specific folder on the remote system


More information about the wp-hackers mailing list