| _CP_oconv | Index Level | _CP_out |
| Syntax | int _CP_open(int* fd, CPSTR* string1, CPSTR* string2) |
| Category | C Interface |
| Type | C Function |
| Description |
equivalent to the FlashBASIC statement: open
open string1,string2 to fd Upon successful return, the first parameter is a pointer to an integer file descriptor which may be passed to other file system calls. string1 should be "dict" or "data", or may be passed as _CP_str_null. string2 should be the file name. This function returns -1 if an error occurs. The error code is contained in _CP_errno. |
| Options | |
| See Also | C Functions introduction _CP_close _CP_replace_bridge _CP_write _CP_writev _CP_release |
| Example |
CPSTR * s = _CP_mkstr("myfile");
int f; _CP_open(&f,_CP_str_null,s); _CP_clearfile(f); _CP_close(f); |
| Warnings | |
| Compatibility | AP 6.1 |
| _CP_oconv | Index Level | _CP_out |