NAME

Daizu::Wc - access to database working copies

DESCRIPTION

Objects of this class provide methods for accessing the data in Daizu CMS database working copies.

METHODS

Daizu::Wc->new($cms, $id)

Return an object representing a working copy in the database, given its ID number. The default if no working copy ID is given is the working copy which represents the state of the live web content (usually working copy 1).

Daizu::Wc->checkout($cms, $branch, $revnum)

Creates a new working copy on $branch (either the ID number or path of a known branch) and updates it to revision $revnum (or the latest revision if that is undef).

Returns a Daizu::Wc object for accessing it.

$wc->id

Return the ID number of the working copy.

$wc->current_revision

Return the number of the revision which the working copy is currently updated to.

$wc->file_at_path($path)

Return a Daizu::File object representing the file or directory which currently resides at $path in the working copy. Dies if there is no such file.

$wc->update($revnum)

Update a database working copy to revision $revnum. This is done in a transaction, which will be rolled back if anything goes wrong, leaving the WC in its original state. $revnum can be undef to update to the most recent revision available.

$wc->add_file($path, $data)

TODO - this method isn't safe to use yet, and will corrupt the working copy.

$wc->add_directory($path)

TODO - this method isn't safe to use yet, and will corrupt the working copy.

$wc->change_file_content($file_id, $data)

TODO - this method isn't safe to use yet, and will corrupt the working copy.

$wc->change_property($file_id, $name, $value)

TODO - this method isn't safe to use yet, and will corrupt the working copy.

$wc->commit

TODO - this doesn't do anything yet

COPYRIGHT

This software is copyright 2006 Geoff Richards <geoff@laxan.com>. For licensing information see this page:

http://www.daizucms.org/license/