MCPcopy Create free account
hub / github.com/aboutcode-org/scancode-toolkit / open

Method open

samples/zlib/iostream2/zstream.h:65–68  ·  view source on GitHub ↗

Opens a gzip (.gz) file for reading. * open() can be used to read a file which is not in gzip format; * in this case read() will directly read from the file without * decompression. errno can be checked to distinguish two error * cases (if errno is zero, the zlib error is Z_MEM_ERROR). */

Source from the content-addressed store, hash-verified

63 * cases (if errno is zero, the zlib error is Z_MEM_ERROR).
64 */
65 void open(const char* name) {
66 if (m_fp) close();
67 m_fp = ::gzopen(name, "rb");
68 }
69
70 void open(FILE* fp) {
71 SET_BINARY_MODE(fp);

Callers 15

mainFunction · 0.45
__attrs_post_init__Method · 0.45
dumpMethod · 0.45
parseMethod · 0.45
parseMethod · 0.45
parseMethod · 0.45
parseMethod · 0.45
parseMethod · 0.45
parseMethod · 0.45
write_fileFunction · 0.45
parseMethod · 0.45
get_meta_yaml_dataFunction · 0.45

Calls 1

closeFunction · 0.50

Tested by 5

mainFunction · 0.36
__attrs_post_init__Method · 0.36
dumpMethod · 0.36
load_json_resultFunction · 0.36
check_jsonlines_scanFunction · 0.36