![]() |
Sayonara Player
|
Filehelper functions.
Functions | |
| QString | clean_filename (const QString &filename) |
| formatter for filepaths. Removes double separators and replaces them with os specific separators. More... | |
| QString | calc_file_extension (const QString &filename) |
| calc_file_extension More... | |
| void | remove_files_in_directory (const QString &dir_name, const QStringList &filters) |
| Remove all files from directory. More... | |
| void | remove_files_in_directory (const QString &dir_name) |
| void | delete_files (const QStringList &files) |
| Remove all given files (also directories can be specified) More... | |
| QString | get_parent_directory (const QString &path) |
| get parent directory of a filepath More... | |
| QString | get_filename_of_path (const QString &path) |
| extract pure filename from a complete file path More... | |
| void | split_filename (const QString &src, QString &dir, QString &filename) |
| split filename into the dir and filename More... | |
| QString | get_file_extension (const QString &filename) |
| get file extension More... | |
| QStringList | get_parent_directories (const QStringList &list) |
| extract parent folder of a file list (see also get_parent_directory(const QString& path) More... | |
| QString | get_absolute_filename (const QString &filename) |
| get absolute filename of file More... | |
| bool | create_directories (const QString &path) |
| create all directories necessary to access path More... | |
| QString | calc_filesize_str (quint64 filesize) |
| convert filesize to string More... | |
| bool | is_absolute (const QString &filename) |
| Tell whether filename is absolute. More... | |
| bool | write_file (const QByteArray &raw_data, const QString &filename) |
| Write raw data to file. More... | |
| bool | read_file_into_str (const QString &filename, QString &content) |
| read a complete file into a string More... | |
| bool | read_file_into_byte_arr (const QString &filename, QByteArray &content) |
| read a complete file into a byte array More... | |
| bool | check_file (const QString &filepath) |
| Check, if file is valid. Web URLs are always valid. More... | |
| bool | is_url (const QString &str) |
| bool | is_www (const QString &str) |
| bool | is_file (const QString &filename) |
| bool | is_dir (const QString &filename) |
| bool | is_soundfile (const QString &filename) |
| bool | is_playlistfile (const QString &filename) |
| QString Helper::File::calc_file_extension | ( | const QString & | filename | ) |
calc_file_extension
| filename |
| QString Helper::File::calc_filesize_str | ( | quint64 | filesize | ) |
convert filesize to string
| filesize | in bytes |
| bool Helper::File::check_file | ( | const QString & | filepath | ) |
Check, if file is valid. Web URLs are always valid.
| filepath | path to file or resource |
| QString Helper::File::clean_filename | ( | const QString & | filename | ) |
formatter for filepaths. Removes double separators and replaces them with os specific separators.
| filename | input filename |
| bool Helper::File::create_directories | ( | const QString & | path | ) |
create all directories necessary to access path
| path | full target path |
| void Helper::File::delete_files | ( | const QStringList & | files | ) |
Remove all given files (also directories can be specified)
| files | list of files |
| QString Helper::File::get_absolute_filename | ( | const QString & | filename | ) |
get absolute filename of file
| filename |
| QString Helper::File::get_file_extension | ( | const QString & | filename | ) |
get file extension
| filename | filename to get the extension for |
| QString Helper::File::get_filename_of_path | ( | const QString & | path | ) |
extract pure filename from a complete file path
| path | complete file path |
| QStringList Helper::File::get_parent_directories | ( | const QStringList & | list | ) |
extract parent folder of a file list (see also get_parent_directory(const QString& path)
| list | file list |
| QString Helper::File::get_parent_directory | ( | const QString & | path | ) |
get parent directory of a filepath
| path | File- or directory path |
| bool Helper::File::is_absolute | ( | const QString & | filename | ) |
Tell whether filename is absolute.
| filename | the filename to check |
| bool Helper::File::read_file_into_byte_arr | ( | const QString & | filename, |
| QByteArray & | content | ||
| ) |
read a complete file into a byte array
| filename | filename |
| content | target reference to content |
| bool Helper::File::read_file_into_str | ( | const QString & | filename, |
| QString & | content | ||
| ) |
read a complete file into a string
| filename | filename |
| content | target reference to content |
| void Helper::File::remove_files_in_directory | ( | const QString & | dir_name, |
| const QStringList & | filters | ||
| ) |
Remove all files from directory.
| dir_name | directory name |
| filters | file name filters |
| void Helper::File::split_filename | ( | const QString & | src, |
| QString & | dir, | ||
| QString & | filename | ||
| ) |
split filename into the dir and filename
| src | |
| path | |
| filename |
| bool Helper::File::write_file | ( | const QByteArray & | raw_data, |
| const QString & | filename | ||
| ) |
Write raw data to file.
| raw_data | raw data |
| filename | target_filename |
1.8.13