Пример #1
0
// Owner Action methods
int
OwnerAction::onRead(ServerContext& ctxt, FileServer& server, const char *path, string& contents)
{
	string owner = server.getOwnerFile(ctxt, path);
	_DEBUG("checking :owner %s is %s and %d", owner.c_str(), ctxt.user(), ctxt.isOwner());
	contents = ctxt.user() == owner ? "1\n" : "0\n";
	return 2;
}