[libcalamares] Add convenience createTargetParentDirs()
This commit is contained in:
parent
6ede9f2c7c
commit
240fe2a564
@ -378,6 +378,12 @@ System::createTargetDirs( const QString& path ) const
|
||||
return d.mkpath( target ); // This re-does everything starting from the **host** /
|
||||
}
|
||||
|
||||
bool
|
||||
System::createTargetParentDirs( const QString& filePath ) const
|
||||
{
|
||||
return createTargetDirs( QFileInfo( filePath ).dir().path() );
|
||||
}
|
||||
|
||||
|
||||
QPair< quint64, float >
|
||||
System::getTotalMemoryB() const
|
||||
|
@ -255,17 +255,24 @@ public:
|
||||
*/
|
||||
DLLEXPORT void removeTargetFile( const QString& path ) const;
|
||||
|
||||
/** @brief Ensure that the directories above @p path exist
|
||||
/** @brief Ensure that the directory @p path exists
|
||||
*
|
||||
* @param path a full pathname to a desired directory.
|
||||
*
|
||||
* All the directory components including the last path component are
|
||||
* created, as needed, with 0755 permissions. Returns true on success.
|
||||
* created, as needed. Returns true on success.
|
||||
*
|
||||
* @see QDir::mkpath
|
||||
*/
|
||||
DLLEXPORT bool createTargetDirs( const QString& path ) const;
|
||||
|
||||
/** @brief Convenience to create parent directories of a file path.
|
||||
*
|
||||
* Creates all the parent directories until the last
|
||||
* component of @p filePath . @see createTargetDirs()
|
||||
*/
|
||||
DLLEXPORT bool createTargetParentDirs( const QString& filePath ) const;
|
||||
|
||||
/**
|
||||
* @brief getTotalMemoryB returns the total main memory, in bytes.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user