Exemplo n.º 1
0
bool Array::exists(CVarRef key, bool isKey /* = false */) const {
    switch(key.getType()) {
    case KindOfBoolean:
    case KindOfInt64:
        return existsImpl(key.toInt64());
    default:
        break;
    }
    if (isKey) return existsImpl(key);
    VarNR k(key.toKey());
    if (!k.isNull()) {
        return existsImpl(k);
    }
    return false;
}
Exemplo n.º 2
0
bool FileImpl::createDirectoryImpl()
{
	poco_assert (!_path.empty());
	
	if (existsImpl() && isDirectoryImpl())
		return false;
	if (CreateDirectoryA(_path.c_str(), 0) == 0)
		handleLastErrorImpl(_path);
	return true;
}
Exemplo n.º 3
0
bool FileImpl::createDirectoryImpl()
{
	poco_assert (!_path.empty());

	if (existsImpl() && isDirectoryImpl())
		return false;
	if (mkdir(_path.c_str(), S_IRWXU | S_IRWXG | S_IRWXO) != 0) 
		handleLastErrorImpl(_path);
	return true;
}
Exemplo n.º 4
0
bool FileImpl::createDirectoryImpl()
{
	poco_assert (!_path.empty());

	if (existsImpl() && isDirectoryImpl())
		return false;
	Path p(_path);
	p.makeDirectory();
	if (mkdir(p.toString().c_str(), S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH) != 0) 
		handleLastErrorImpl(_path);
	return true;
}
Exemplo n.º 5
0
bool Array::exists(CStrRef key, bool isKey /* = false */) const {
    if (isKey) return existsImpl(key);
    return existsImpl(key.toKey());
}
Exemplo n.º 6
0
bool Array::exists(litstr key, bool isKey /* = false */) const {
    if (isKey) return existsImpl(key);
    return existsImpl(String(key).toKey());
}
Exemplo n.º 7
0
bool File::exists() const
{
	return existsImpl();
}