Lines Matching refs:resource

130 	php_url *resource = NULL;  in php_ftp_fopen_connect()  local
136 resource = php_url_parse(path); in php_ftp_fopen_connect()
137 if (resource == NULL || resource->path == NULL) { in php_ftp_fopen_connect()
138 if (resource && presource) { in php_ftp_fopen_connect()
139 *presource = resource; in php_ftp_fopen_connect()
144 …use_ssl = resource->scheme && (ZSTR_LEN(resource->scheme) > 3) && ZSTR_VAL(resource->scheme)[3] ==… in php_ftp_fopen_connect()
147 if (resource->port == 0) in php_ftp_fopen_connect()
148 resource->port = 21; in php_ftp_fopen_connect()
150 …transport_len = (int)spprintf(&transport, 0, "tcp://%s:%d", ZSTR_VAL(resource->host), resource->po… in php_ftp_fopen_connect()
240 if (resource->user != NULL) { in php_ftp_fopen_connect()
241 ZSTR_LEN(resource->user) = php_raw_url_decode(ZSTR_VAL(resource->user), ZSTR_LEN(resource->user)); in php_ftp_fopen_connect()
243 PHP_FTP_CNTRL_CHK(ZSTR_VAL(resource->user), ZSTR_LEN(resource->user), "Invalid login %s") in php_ftp_fopen_connect()
245 php_stream_printf(stream, "USER %s\r\n", ZSTR_VAL(resource->user)); in php_ftp_fopen_connect()
257 if (resource->pass != NULL) { in php_ftp_fopen_connect()
258 … ZSTR_LEN(resource->pass) = php_raw_url_decode(ZSTR_VAL(resource->pass), ZSTR_LEN(resource->pass)); in php_ftp_fopen_connect()
260 PHP_FTP_CNTRL_CHK(ZSTR_VAL(resource->pass), ZSTR_LEN(resource->pass), "Invalid password %s") in php_ftp_fopen_connect()
262 php_stream_printf(stream, "PASS %s\r\n", ZSTR_VAL(resource->pass)); in php_ftp_fopen_connect()
296 *presource = resource; in php_ftp_fopen_connect()
302 php_url_free(resource); in php_ftp_fopen_connect()
407 php_url *resource = NULL; in php_stream_url_wrap_ftp() local
456 …_connect(wrapper, path, mode, options, opened_path, context, &reuseid, &resource, &use_ssl, &use_s… in php_stream_url_wrap_ftp()
468 php_stream_printf(stream, "SIZE %s\r\n", ZSTR_VAL(resource->path)); in php_stream_url_wrap_ftp()
497 php_stream_printf(stream, "DELE %s\r\n", ZSTR_VAL(resource->path)); in php_stream_url_wrap_ftp()
541 …php_stream_printf(stream, "%s %s\r\n", tmp_line, (resource->path != NULL ? ZSTR_VAL(resource->path… in php_stream_url_wrap_ftp()
545 hoststart = ZSTR_VAL(resource->host); in php_stream_url_wrap_ftp()
582 php_url_free(resource); in php_stream_url_wrap_ftp()
586 if (resource) { in php_stream_url_wrap_ftp()
587 php_url_free(resource); in php_stream_url_wrap_ftp()
686 php_url *resource = NULL; in php_stream_ftp_opendir() local
694 …_connect(wrapper, path, mode, options, opened_path, context, &reuseid, &resource, &use_ssl, &use_s… in php_stream_ftp_opendir()
717 hoststart = ZSTR_VAL(resource->host); in php_stream_ftp_opendir()
725 …php_stream_printf(stream, "NLST %s\r\n", (resource->path != NULL ? ZSTR_VAL(resource->path) : "/")… in php_stream_ftp_opendir()
748 php_url_free(resource); in php_stream_ftp_opendir()
758 if (resource) { in php_stream_ftp_opendir()
759 php_url_free(resource); in php_stream_ftp_opendir()
776 php_url *resource = NULL; in php_stream_ftp_url_stat() local
783 stream = php_ftp_fopen_connect(wrapper, url, "r", 0, NULL, context, NULL, &resource, NULL, NULL); in php_stream_ftp_url_stat()
789 …php_stream_printf(stream, "CWD %s\r\n", (resource->path != NULL ? ZSTR_VAL(resource->path) : "/"))… in php_stream_ftp_url_stat()
805 …php_stream_printf(stream, "SIZE %s\r\n", (resource->path != NULL ? ZSTR_VAL(resource->path) : "/")… in php_stream_ftp_url_stat()
820 …php_stream_printf(stream, "MDTM %s\r\n", (resource->path != NULL ? ZSTR_VAL(resource->path) : "/")… in php_stream_ftp_url_stat()
880 php_url_free(resource); in php_stream_ftp_url_stat()
884 if (resource) { in php_stream_ftp_url_stat()
885 php_url_free(resource); in php_stream_ftp_url_stat()
898 php_url *resource = NULL; in php_stream_ftp_unlink() local
902 stream = php_ftp_fopen_connect(wrapper, url, "r", 0, NULL, context, NULL, &resource, NULL, NULL); in php_stream_ftp_unlink()
910 if (resource->path == NULL) { in php_stream_ftp_unlink()
918 php_stream_printf(stream, "DELE %s\r\n", ZSTR_VAL(resource->path)); in php_stream_ftp_unlink()
928 php_url_free(resource); in php_stream_ftp_unlink()
933 if (resource) { in php_stream_ftp_unlink()
934 php_url_free(resource); in php_stream_ftp_unlink()
1025 php_url *resource = NULL; in php_stream_ftp_mkdir() local
1029 stream = php_ftp_fopen_connect(wrapper, url, "r", 0, NULL, context, NULL, &resource, NULL, NULL); in php_stream_ftp_mkdir()
1037 if (resource->path == NULL) { in php_stream_ftp_mkdir()
1045 php_stream_printf(stream, "MKD %s\r\n", ZSTR_VAL(resource->path)); in php_stream_ftp_mkdir()
1051 buf = estrndup(ZSTR_VAL(resource->path), ZSTR_LEN(resource->path)); in php_stream_ftp_mkdir()
1052 e = buf + ZSTR_LEN(resource->path); in php_stream_ftp_mkdir()
1092 php_url_free(resource); in php_stream_ftp_mkdir()
1103 if (resource) { in php_stream_ftp_mkdir()
1104 php_url_free(resource); in php_stream_ftp_mkdir()
1117 php_url *resource = NULL; in php_stream_ftp_rmdir() local
1121 stream = php_ftp_fopen_connect(wrapper, url, "r", 0, NULL, context, NULL, &resource, NULL, NULL); in php_stream_ftp_rmdir()
1129 if (resource->path == NULL) { in php_stream_ftp_rmdir()
1136 php_stream_printf(stream, "RMD %s\r\n", ZSTR_VAL(resource->path)); in php_stream_ftp_rmdir()
1146 php_url_free(resource); in php_stream_ftp_rmdir()
1152 if (resource) { in php_stream_ftp_rmdir()
1153 php_url_free(resource); in php_stream_ftp_rmdir()