2 * Copyright 2013, Ingo Weinhold, ingo_weinhold@gmx.de.
3 * Distributed under the terms of the MIT License.
7 #include <package/UserSettingsFileInfo.h>
9 #include <package/hpkg/PackageInfoAttributeValue.h>
12 namespace BPackageKit
{
15 BUserSettingsFileInfo::BUserSettingsFileInfo()
23 BUserSettingsFileInfo::BUserSettingsFileInfo(
24 const BHPKG::BUserSettingsFileInfoData
& infoData
)
27 fTemplatePath(infoData
.templatePath
),
28 fIsDirectory(infoData
.isDirectory
)
33 BUserSettingsFileInfo::BUserSettingsFileInfo(const BString
& path
,
34 const BString
& templatePath
)
37 fTemplatePath(templatePath
),
43 BUserSettingsFileInfo::BUserSettingsFileInfo(const BString
& path
,
48 fIsDirectory(isDirectory
)
53 BUserSettingsFileInfo::~BUserSettingsFileInfo()
59 BUserSettingsFileInfo::InitCheck() const
61 return fPath
.IsEmpty() ? B_NO_INIT
: B_OK
;
66 BUserSettingsFileInfo::Path() const
73 BUserSettingsFileInfo::TemplatePath() const
80 BUserSettingsFileInfo::IsDirectory() const
87 BUserSettingsFileInfo::SetTo(const BString
& path
, const BString
& templatePath
)
90 fTemplatePath
= templatePath
;
96 BUserSettingsFileInfo::SetTo(const BString
& path
, bool isDirectory
)
99 fTemplatePath
.Truncate(0);
100 fIsDirectory
= isDirectory
;
104 } // namespace BPackageKit