/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
namespace vcl
{ namespace
{
OUString convertToAbsolutePath(const OUString& path)
{
salhelper::LinkResolver resolver(0);
osl::FileBase::RC rc = resolver.fetchFileStatus(path); if (rc != osl::FileBase::E_None)
{
SAL_WARN("vcl.app", "Could not resolve path '" << path << "' to search for icon themes."); if (rc == osl::FileBase::E_MULTIHOP)
{ throw std::runtime_error("Provided a recursive symlink to an icon theme directory that " "could not be resolved.");
}
} return resolver.m_aStatus.getFileURL();
}
}
namespace file
{ // read the status of a file. Returns false if the status could not be determined. bool readFileStatus(osl::FileStatus& status, const OUString& file)
{
osl::DirectoryItem dirItem;
osl::FileBase::RC retvalGet = osl::DirectoryItem::get(file, dirItem); if (retvalGet != osl::FileBase::E_None)
{
SAL_WARN("vcl.app", "Could not determine status for file '" << file << "'."); returnfalse;
}
osl::FileBase::RC retvalStatus = dirItem.getFileStatus(status); if (retvalStatus != osl::FileBase::E_None)
{
SAL_WARN("vcl.app", "Could not determine status for file '" << file << "'."); returnfalse;
} returntrue;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.