Lines Matching refs:resource

139 	php_url *resource = NULL;  in php_ftp_fopen_connect()  local
145 resource = php_url_parse(path); in php_ftp_fopen_connect()
146 if (resource == NULL || resource->path == NULL) { in php_ftp_fopen_connect()
147 if (resource && presource) { in php_ftp_fopen_connect()
148 *presource = resource; in php_ftp_fopen_connect()
153 use_ssl = resource->scheme && (strlen(resource->scheme) > 3) && resource->scheme[3] == 's'; in php_ftp_fopen_connect()
156 if (resource->port == 0) in php_ftp_fopen_connect()
157 resource->port = 21; in php_ftp_fopen_connect()
159 transport_len = (int)spprintf(&transport, 0, "tcp://%s:%d", resource->host, resource->port); in php_ftp_fopen_connect()
249 if (resource->user != NULL) { in php_ftp_fopen_connect()
250 tmp_len = (int)php_raw_url_decode(resource->user, (int)strlen(resource->user)); in php_ftp_fopen_connect()
252 PHP_FTP_CNTRL_CHK(resource->user, tmp_len, "Invalid login %s") in php_ftp_fopen_connect()
254 php_stream_printf(stream, "USER %s\r\n", resource->user); in php_ftp_fopen_connect()
266 if (resource->pass != NULL) { in php_ftp_fopen_connect()
267 tmp_len = (int)php_raw_url_decode(resource->pass, (int)strlen(resource->pass)); in php_ftp_fopen_connect()
269 PHP_FTP_CNTRL_CHK(resource->pass, tmp_len, "Invalid password %s") in php_ftp_fopen_connect()
271 php_stream_printf(stream, "PASS %s\r\n", resource->pass); in php_ftp_fopen_connect()
305 *presource = resource; in php_ftp_fopen_connect()
311 if (resource) { in php_ftp_fopen_connect()
312 php_url_free(resource); in php_ftp_fopen_connect()
420 php_url *resource = NULL; in php_stream_url_wrap_ftp() local
469 …_connect(wrapper, path, mode, options, opened_path, context, &reuseid, &resource, &use_ssl, &use_s… in php_stream_url_wrap_ftp()
481 php_stream_printf(stream, "SIZE %s\r\n", resource->path); in php_stream_url_wrap_ftp()
510 php_stream_printf(stream, "DELE %s\r\n", resource->path); in php_stream_url_wrap_ftp()
554 php_stream_printf(stream, "%s %s\r\n", tmp_line, (resource->path != NULL ? resource->path : "/")); in php_stream_url_wrap_ftp()
558 hoststart = resource->host; in php_stream_url_wrap_ftp()
595 php_url_free(resource); in php_stream_url_wrap_ftp()
599 if (resource) { in php_stream_url_wrap_ftp()
600 php_url_free(resource); in php_stream_url_wrap_ftp()
701 php_url *resource = NULL; in php_stream_ftp_opendir() local
709 …_connect(wrapper, path, mode, options, opened_path, context, &reuseid, &resource, &use_ssl, &use_s… in php_stream_ftp_opendir()
732 hoststart = resource->host; in php_stream_ftp_opendir()
740 php_stream_printf(stream, "NLST %s\r\n", (resource->path != NULL ? resource->path : "/")); in php_stream_ftp_opendir()
763 php_url_free(resource); in php_stream_ftp_opendir()
773 if (resource) { in php_stream_ftp_opendir()
774 php_url_free(resource); in php_stream_ftp_opendir()
792 php_url *resource = NULL; in php_stream_ftp_url_stat() local
799 stream = php_ftp_fopen_connect(wrapper, url, "r", 0, NULL, context, NULL, &resource, NULL, NULL); in php_stream_ftp_url_stat()
805 …php_stream_printf(stream, "CWD %s\r\n", (resource->path != NULL ? resource->path : "/")); /* If we… in php_stream_ftp_url_stat()
821 php_stream_printf(stream, "SIZE %s\r\n", (resource->path != NULL ? resource->path : "/")); in php_stream_ftp_url_stat()
836 php_stream_printf(stream, "MDTM %s\r\n", (resource->path != NULL ? resource->path : "/")); in php_stream_ftp_url_stat()
896 php_url_free(resource); in php_stream_ftp_url_stat()
900 if (resource) { in php_stream_ftp_url_stat()
901 php_url_free(resource); in php_stream_ftp_url_stat()
915 php_url *resource = NULL; in php_stream_ftp_unlink() local
919 stream = php_ftp_fopen_connect(wrapper, url, "r", 0, NULL, context, NULL, &resource, NULL, NULL); in php_stream_ftp_unlink()
927 if (resource->path == NULL) { in php_stream_ftp_unlink()
935 php_stream_printf(stream, "DELE %s\r\n", (resource->path != NULL ? resource->path : "/")); in php_stream_ftp_unlink()
945 php_url_free(resource); in php_stream_ftp_unlink()
950 if (resource) { in php_stream_ftp_unlink()
951 php_url_free(resource); in php_stream_ftp_unlink()
1044 php_url *resource = NULL; in php_stream_ftp_mkdir() local
1048 stream = php_ftp_fopen_connect(wrapper, url, "r", 0, NULL, context, NULL, &resource, NULL, NULL); in php_stream_ftp_mkdir()
1056 if (resource->path == NULL) { in php_stream_ftp_mkdir()
1064 php_stream_printf(stream, "MKD %s\r\n", resource->path); in php_stream_ftp_mkdir()
1070 buf = estrdup(resource->path); in php_stream_ftp_mkdir()
1084 php_stream_printf(stream, "MKD %s\r\n", resource->path); in php_stream_ftp_mkdir()
1112 php_url_free(resource); in php_stream_ftp_mkdir()
1123 if (resource) { in php_stream_ftp_mkdir()
1124 php_url_free(resource); in php_stream_ftp_mkdir()
1138 php_url *resource = NULL; in php_stream_ftp_rmdir() local
1142 stream = php_ftp_fopen_connect(wrapper, url, "r", 0, NULL, context, NULL, &resource, NULL, NULL); in php_stream_ftp_rmdir()
1150 if (resource->path == NULL) { in php_stream_ftp_rmdir()
1157 php_stream_printf(stream, "RMD %s\r\n", resource->path); in php_stream_ftp_rmdir()
1167 php_url_free(resource); in php_stream_ftp_rmdir()
1173 if (resource) { in php_stream_ftp_rmdir()
1174 php_url_free(resource); in php_stream_ftp_rmdir()