Re: Help using KArchive with GZIP files
Hi, The first question " I have tried to do this but there some error that block me to open a file. I dont know if i am using correctly the class KCompressionDevice." is related with the code down bellow. auto kgzip = KCompressionDevice(QUrl(where.toString() + “/” + fileName + “.gz”).toLocalFile(), KCompressionDevice::GZip); assert(kgzip.isOpen() == true); kgzip.write(QString("hello World").toUtf8()); kgzip.close(); El 02/11/2020 22:34 Albert Astals Cidescribió: El dilluns, 2 de novembre de 2020, a les 22:23:44 CET, Gabriel Domínguez Camarero va escriure: Hello I am gabridc, Hello Gabriel, this KDE Frameworks devel is for discussion around development *of* KDE Frameworks not *with* KDE Frameworks, your question belongs to kde-de...@kde.org I am a developer for Index-fm and we are trying to integrate KArchive in the file explorer, I have tried to do this but there some error that block me to open a file. I dont know if i am using correctly the class KCompressionDevice. Is this question related to the code down below? or different? Also, I would to ask another question because I would like to write a file inside my file.gz but in this case I dont have the function writeFile like KTar or KZip classes. You can't write a file *inside* a gz file, a gz is not multiple files, it's just one file (a .tar.gz is still just one gz file, it's the tar part that has multiple files). Cheers, Albert auto kgzip = KCompressionDevice(QUrl(where.toString() + “/” + fileName + “.gz”).toLocalFile(), KCompressionDevice::GZip); assert(kgzip.isOpen() == true); kgzip.write(QString("hello World").toUtf8()); kgzip.close();
Re: Help using KArchive with GZIP files
El dilluns, 2 de novembre de 2020, a les 22:23:44 CET, Gabriel Domínguez Camarero va escriure: > Hello I am gabridc, Hello Gabriel, this KDE Frameworks devel is for discussion around development *of* KDE Frameworks not *with* KDE Frameworks, your question belongs to kde-de...@kde.org > > > > I am a developer for Index-fm and we are trying to integrate KArchive in the > file explorer, I have tried to do this but there some error that block me to > open a file. I dont know if i am using correctly the class KCompressionDevice. Is this question related to the code down below? or different? > Also, I would to ask another question because I would like to write a file > inside my file.gz but in this case I dont have the function writeFile like > KTar or KZip classes. You can't write a file *inside* a gz file, a gz is not multiple files, it's just one file (a .tar.gz is still just one gz file, it's the tar part that has multiple files). Cheers, Albert > > > > auto kgzip = KCompressionDevice(QUrl(where.toString() + “/” + fileName + > “.gz”).toLocalFile(), KCompressionDevice::GZip); > assert(kgzip.isOpen() == true); > > > kgzip.write(QString("hello World").toUtf8()); > kgzip.close();
Help using KArchive with GZIP files
Hello I am gabridc, I am a developer for Index-fm and we are trying to integrate KArchive in the file explorer, I have tried to do this but there some error that block me to open a file. I dont know if i am using correctly the class KCompressionDevice. Also, I would to ask another question because I would like to write a file inside my file.gz but in this case I dont have the function writeFile like KTar or KZip classes. auto kgzip = KCompressionDevice(QUrl(where.toString() + “/” + fileName + “.gz”).toLocalFile(), KCompressionDevice::GZip); assert(kgzip.isOpen() == true); kgzip.write(QString("hello World").toUtf8()); kgzip.close();