Example #1
0
bool File::isAChildOf (const File& potentialParent) const
{
    if (potentialParent.fullPath.isEmpty())
        return false;

    auto ourPath = getPathUpToLastSlash();

    if (compareFilenames (potentialParent.fullPath, ourPath) == 0)
        return true;

    if (potentialParent.fullPath.length() >= ourPath.length())
        return false;

    return getParentDirectory().isAChildOf (potentialParent);
}
Example #2
0
File File::getParentDirectory() const
{
    return File (getPathUpToLastSlash(), (int) 0);
}
File File::getParentDirectory() const
{
    File f;
    f.fullPath = getPathUpToLastSlash();
    return f;
}
Example #4
0
File File::getParentDirectory() const
{
    return createFileWithoutCheckingPath (getPathUpToLastSlash());
}
Example #5
0
Path Path::getParentDirectory() const
{
    Path f;
    f.fullPath = getPathUpToLastSlash();
    return f;
}