!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/usr/share/doc/libzipios++-doc/html/   drwxr-xr-x
Free 13.19 GB of 57.97 GB (22.75%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     test__zipoutputstream_8cpp_source.html (15.11 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
Zipios++: test_zipoutputstream.cpp Source File
Zipios++
test_zipoutputstream.cpp
Go to the documentation of this file.
1 #include "zipios++/zipios-config.h"
2 
3 #include "zipios++/meta-iostreams.h"
4 #include <string>
5 
7 
8 using namespace zipios ;
9 
10 using std::cerr ;
11 using std::cout ;
12 using std::endl ;
13 using std::ifstream ;
14 using std::ios ;
15 using std::string ;
16 
17 void writeFileToZipOutputStream( ZipOutputStream &zos, const string &filename ) ;
18 
19 int main() {
20  try {
21 
22  ZipOutputStream ozs( "zos.zip" ) ;
23 
24  writeFileToZipOutputStream( ozs, "test_zip" ) ;
25  writeFileToZipOutputStream( ozs, "test_dircoll" ) ;
26  writeFileToZipOutputStream( ozs, "test.zip" ) ;
27  writeFileToZipOutputStream( ozs, "test_simplesmartptr" ) ;
28  writeFileToZipOutputStream( ozs, "test_appzip" ) ;
29 
30  cerr << "End of main" << endl ;
31 
32  return 0;
33  }
34  catch( exception &excp ) {
35  cerr << "Exception caught in main() :" << endl ;
36  cerr << excp.what() << endl ;
37  }
38  return -1;
39 }
40 
41 void writeFileToZipOutputStream( ZipOutputStream &zos, const string &filename ) {
42  zos.putNextEntry( ZipCDirEntry( filename ) ) ;
43 
44  ifstream ifs( filename.c_str(), ios::in | ios::binary ) ;
45 
46  zos << ifs.rdbuf() ;
47 
48  cerr << "ostream Stream state: " ;
49  cerr << "good() = " << zos.good() << ",\t" ;
50  cerr << "fail() = " << zos.fail() << ",\t" ;
51  cerr << "bad() = " << zos.bad() << ",\t" ;
52  cerr << "eof() = " << zos.eof() << endl ;
53 
54  cerr << "istream Stream state: " ;
55  cerr << "good() = " << ifs.good() << ",\t" ;
56  cerr << "fail() = " << ifs.fail() << ",\t" ;
57  cerr << "bad() = " << ifs.bad() << ",\t" ;
58  cerr << "eof() = " << ifs.eof() << endl ;
59 
60 }
61 
66 /*
67  Zipios++ - a small C++ library that provides easy access to .zip files.
68  Copyright (C) 2000 Thomas Søndergaard
69 
70  This library is free software; you can redistribute it and/or
71  modify it under the terms of the GNU Lesser General Public
72  License as published by the Free Software Foundation; either
73  version 2 of the License, or (at your option) any later version.
74 
75  This library is distributed in the hope that it will be useful,
76  but WITHOUT ANY WARRANTY; without even the implied warranty of
77  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
78  Lesser General Public License for more details.
79 
80  You should have received a copy of the GNU Lesser General Public
81  License along with this library; if not, write to the Free Software
82  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
83 */
void putNextEntry(const ZipCDirEntry &entry)
Specialization of ZipLocalEntry, that add fields for storing the extra information,...
Definition: ziphead.h:102

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0049 ]--