MCPcopy Create free account
hub / github.com/acl-dev/acl / open

Method open

lib_acl_cpp/src/stream/fstream.cpp:24–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22}
23
24void fstream::open(ACL_FILE_HANDLE fh, unsigned int oflags,
25 const char* path /* = NULL */)
26{
27 open_stream(true); // ���û��෽���ȴ�����������
28
29 acl_assert(ACL_VSTREAM_FILE(stream_) == ACL_FILE_INVALID);
30
31 stream_->fread_fn = acl_file_read;
32 stream_->fwrite_fn = acl_file_write;
33 stream_->fwritev_fn = acl_file_writev;
34 stream_->fclose_fn = acl_file_close;
35
36 stream_->fd.h_file = fh;
37 stream_->type = ACL_VSTREAM_TYPE_FILE;
38 stream_->oflags = oflags;
39 stream_->omode = 0600;
40
41 opened_ = true;
42 eof_ = false;
43
44 if (path && *path) {
45 acl_vstream_set_path(stream_, path);
46 }
47}
48
49bool fstream::open(const char* path, unsigned int oflags, int mode)
50{

Callers 2

setup_hookMethod · 0.45
setup_hookMethod · 0.45

Calls 2

acl_vstream_set_pathFunction · 0.85
acl_file_openFunction · 0.85

Tested by

no test coverage detected