size.c File Reference

Check the size of a file on a remote FTP server. More...

#include "globus_common.h"
#include "globus_url.h"
#include "globus_ftp_control.h"
#include "ftp_demo.h"

Compounds

struct  ftp_demo_size_handle_info_t

Enumerations

enum  ftp_demo_size_handle_state_t {
  FTP_DEMO_IDLE,
  FTP_DEMO_CONNECT,
  FTP_DEMO_AUTH,
  FTP_DEMO_BINARY,
  FTP_DEMO_NOOP,
  FTP_DEMO_SIZE,
  FTP_DEMO_CLOSE,
  FTP_DEMO_DONE
}

Functions

globus_size_t ftp_demo_check_size ( const char * url)
 Check the size of the given URL. More...


Detailed Description

Check the size of a file on a remote FTP server.


Enumeration Type Documentation

enum ftp_demo_size_handle_state_t
 

For internal use only.


Function Documentation

globus_size_t ftp_demo_check_size ( const char * url )
 

Check the size of the given URL.

This function uses an FTP control handle to send a SIZE request to an ftp server. It waits until a response is received, and then returns the size.

Parameters:
url   URL to query.
Returns:
This function returns the size of the URL if it can be determined, otherwise it returns 0. A return value of zero can mean authentication failed, file does not exist, server unreachable, among other things.