File Manager
A simple file manager written in C++ using Qt 6.
Loading...
Searching...
No Matches
utils.h File Reference
#include <QtCore>
Include dependency graph for utils.h:
This graph shows which files directly or indirectly include this file:

Functions

QString format_bytes (qint64 bytes)
 Format the provided number as bytes.
 
void copyOrMoveDirectorySubtree (const QString &from, const QString &to, bool copyAndRemove, bool overwriteExistingFiles)
 copyOrMoveDirectorySubtree
 

Function Documentation

◆ copyOrMoveDirectorySubtree()

void copyOrMoveDirectorySubtree ( const QString & from,
const QString & to,
bool copyAndRemove,
bool overwriteExistingFiles )

copyOrMoveDirectorySubtree

Parameters
from
to
copyAndRemoveIf true, move instead of copy.
overWriteExistingFilesIf true, overwrite existing files at the destination. Destructive.

Copies a folder and all its contents. Reference: https://forum.qt.io/topic/105993/copy-folder-qt-c/5?_=1675790958476&lang=en-GB

◆ format_bytes()

QString format_bytes ( qint64 bytes)

Format the provided number as bytes.

This file contains utility functions that are used throughout the application.

Parameters
bytes
Returns
a string

Aims to present the number in a human-friendly format. Converts bytes to a higher order unit ("KB", "MB", "GB", "TB"), if possible.