Description

This function queries the repository URL and returns a list of
files and directories, optionally from a specific revision. This
is equivalent to svn list $repos_url[@$revision_no]

Note:

This function does not work with working copies. repos_urlmust be a repository URL.

Parameters

url

URL of the repository, eg. http://www.example.com/svnroot.
To access a local Subversion repository via filesystem, use the
file URI scheme, eg. file:///home/user/svn-repos

revision

Integer revision number to retrieve listing of. When omitted,
the HEAD revision is used.

recurse

Enables recursion.

Return Values

On success, this function returns an array file listing in the format
of:

[0] => Array
(
[created_rev] => integer revision number of last edit
[last_author] => string author name of last edit
[size] => integer byte file size of file
[time] => string date of last edit in form 'M d H:i'
or 'M d Y', depending on how old the file is
[time_t] => integer unix timestamp of last edit
[name] => name of file/directory
[type] => type, can be 'file' or 'dir'
)
[1] => ...

Notes

Warning

This function is
EXPERIMENTAL. The behaviour of this function, its name, and
surrounding documentation may change without notice in a future release of PHP.
This function should be used at your own risk.

See Also

User Contributed Notes 1 note

Be aware that the function will condition the path for you; do not do it yourself or you will have resulting errors.

Ex: that paths with spaces in them do NOT need the escaping slash<?phpsvn_ls('file:///var/svn/myrepo/dirA/another dir'); //will work->happinesssvn_ls('file:///var/svn/myrepo/dirA/another\ dir'); //will fail?>Warning: svn_ls(): svn error(s) occured 160013 (Filesystem has no item) URL 'file:///var/svn/myrepo/dirA/another\ dir' non-existent in that revision in file.php on line 42