/* filename */ void *_GIO_fileDispatch(GIOControl *gc) { char *path, *topath; path = _GIO_decomposeURL(gc->path); switch ( gc->gf ) { case gf_dir: _gio_file_dir(gc,path); break; case gf_statfile: _gio_file_statfile(gc,path); break; case gf_mkdir: _gio_file_mkdir(gc,path); break; case gf_delfile: _gio_file_delfile(gc,path); break; case gf_deldir: _gio_file_deldir(gc,path); break; case gf_renamefile: topath = _GIO_decomposeURL(gc->topath); _gio_file_renamefile(gc,path,topath); free(topath); break; default: break; } free(path); return( NULL ); }
/* filename */ void *_GIO_fileDispatch(GIOControl *gc) { char *username, *password, *host, *path, *topath; int port; path = _GIO_decomposeURL(gc->path,&host,&port,&username,&password); free(host); free(username); free(password); switch ( gc->gf ) { case gf_dir: _gio_file_dir(gc,path); break; case gf_statfile: _gio_file_statfile(gc,path); break; #if 0 case gf_getfile: _gio_file_getfile(gc,path); break; case gf_putfile: _gio_file_putfile(gc,path); break; #endif case gf_mkdir: _gio_file_mkdir(gc,path); break; case gf_delfile: _gio_file_delfile(gc,path); break; case gf_deldir: _gio_file_deldir(gc,path); break; case gf_renamefile: topath = _GIO_decomposeURL(gc->topath,&host,&port,&username,&password); free(host); free(username); free(password); _gio_file_renamefile(gc,path,topath); free(topath); break; } free(path); return( NULL ); }