ServerHelperApi::Exists(ClientUser*,Error*)

Checks for the existence of a personal server.

Virtual?

No

 

Class

ServerHelperApi

 

Arguments

ClientUser * ui

A ClientUser object

Returns

int

returns 1 if a personal server exists in the root dir

Notes

Many ServerHelperApi methods expect there to be no existing server in the path set by SetDvcsDir(). Exists() is useful for avoiding potential errors caused by pre-existing servers.

Example

// Check that we don't already have a DVCS tree at the target directory
personalServer.SetDvcsDir( "/User/home/dev", &e );
if( e.Test() )
    return 1;

if( personalServer.Exists( &ui, &e ) )
    return 1;