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 if (resource) { in php_ftp_fopen_connect()
303 php_url_free(resource); in php_ftp_fopen_connect()
409 php_url *resource = NULL; in php_stream_url_wrap_ftp() local
458 …_connect(wrapper, path, mode, options, opened_path, context, &reuseid, &resource, &use_ssl, &use_s… in php_stream_url_wrap_ftp()
470 php_stream_printf(stream, "SIZE %s\r\n", ZSTR_VAL(resource->path)); in php_stream_url_wrap_ftp()
499 php_stream_printf(stream, "DELE %s\r\n", ZSTR_VAL(resource->path)); in php_stream_url_wrap_ftp()
543 …php_stream_printf(stream, "%s %s\r\n", tmp_line, (resource->path != NULL ? ZSTR_VAL(resource->path… in php_stream_url_wrap_ftp()
547 hoststart = ZSTR_VAL(resource->host); in php_stream_url_wrap_ftp()
584 php_url_free(resource); in php_stream_url_wrap_ftp()
588 if (resource) { in php_stream_url_wrap_ftp()
589 php_url_free(resource); in php_stream_url_wrap_ftp()
687 php_url *resource = NULL; in php_stream_ftp_opendir() local
695 …_connect(wrapper, path, mode, options, opened_path, context, &reuseid, &resource, &use_ssl, &use_s… in php_stream_ftp_opendir()
718 hoststart = ZSTR_VAL(resource->host); in php_stream_ftp_opendir()
726 …php_stream_printf(stream, "NLST %s\r\n", (resource->path != NULL ? ZSTR_VAL(resource->path) : "/")… in php_stream_ftp_opendir()
749 php_url_free(resource); in php_stream_ftp_opendir()
759 if (resource) { in php_stream_ftp_opendir()
760 php_url_free(resource); in php_stream_ftp_opendir()
777 php_url *resource = NULL; in php_stream_ftp_url_stat() local
784 stream = php_ftp_fopen_connect(wrapper, url, "r", 0, NULL, context, NULL, &resource, NULL, NULL); in php_stream_ftp_url_stat()
790 …php_stream_printf(stream, "CWD %s\r\n", (resource->path != NULL ? ZSTR_VAL(resource->path) : "/"))… in php_stream_ftp_url_stat()
806 …php_stream_printf(stream, "SIZE %s\r\n", (resource->path != NULL ? ZSTR_VAL(resource->path) : "/")… in php_stream_ftp_url_stat()
821 …php_stream_printf(stream, "MDTM %s\r\n", (resource->path != NULL ? ZSTR_VAL(resource->path) : "/")… in php_stream_ftp_url_stat()
881 php_url_free(resource); in php_stream_ftp_url_stat()
885 if (resource) { in php_stream_ftp_url_stat()
886 php_url_free(resource); in php_stream_ftp_url_stat()
899 php_url *resource = NULL; in php_stream_ftp_unlink() local
903 stream = php_ftp_fopen_connect(wrapper, url, "r", 0, NULL, context, NULL, &resource, NULL, NULL); in php_stream_ftp_unlink()
911 if (resource->path == NULL) { in php_stream_ftp_unlink()
919 …php_stream_printf(stream, "DELE %s\r\n", (resource->path != NULL ? ZSTR_VAL(resource->path) : "/")… in php_stream_ftp_unlink()
929 php_url_free(resource); in php_stream_ftp_unlink()
934 if (resource) { in php_stream_ftp_unlink()
935 php_url_free(resource); in php_stream_ftp_unlink()
1026 php_url *resource = NULL; in php_stream_ftp_mkdir() local
1030 stream = php_ftp_fopen_connect(wrapper, url, "r", 0, NULL, context, NULL, &resource, NULL, NULL); in php_stream_ftp_mkdir()
1038 if (resource->path == NULL) { in php_stream_ftp_mkdir()
1046 php_stream_printf(stream, "MKD %s\r\n", ZSTR_VAL(resource->path)); in php_stream_ftp_mkdir()
1052 buf = estrndup(ZSTR_VAL(resource->path), ZSTR_LEN(resource->path)); in php_stream_ftp_mkdir()
1053 e = buf + ZSTR_LEN(resource->path); in php_stream_ftp_mkdir()
1093 php_url_free(resource); in php_stream_ftp_mkdir()
1104 if (resource) { in php_stream_ftp_mkdir()
1105 php_url_free(resource); in php_stream_ftp_mkdir()
1118 php_url *resource = NULL; in php_stream_ftp_rmdir() local
1122 stream = php_ftp_fopen_connect(wrapper, url, "r", 0, NULL, context, NULL, &resource, NULL, NULL); in php_stream_ftp_rmdir()
1130 if (resource->path == NULL) { in php_stream_ftp_rmdir()
1137 php_stream_printf(stream, "RMD %s\r\n", ZSTR_VAL(resource->path)); in php_stream_ftp_rmdir()
1147 php_url_free(resource); in php_stream_ftp_rmdir()
1153 if (resource) { in php_stream_ftp_rmdir()
1154 php_url_free(resource); in php_stream_ftp_rmdir()