On Monday, October 11, 2010 10:07:10 you wrote:
> Hello,
> 
> I have a question on how to determine what type is the sftp_attributes
> is. To elaborate, I need to know if the sftp_attributes is a file or a
> subdirectory, how can i determine which is which?

sftp_attributes *sb;

  switch (sb->type) {                                                           
                                                            
    case SSH_FILEXFER_TYPE_DIRECTORY:                                           
                                                            
                /* DO SOMETHING */
                break;
    case SSH_FILEXFER_TYPE_REGULAR:                                             
                                                            
    case SSH_FILEXFER_TYPE_SYMLINK:                                             
                                                            
        case SSH_FILEXFER_TYPE_SPECIAL:                                         
                                                                
    case SSH_FILEXFER_TYPE_UNKNOWN:                                             
                                                            
      return error;                                                             
                                                      
  }

> 
> Thank you.

Cheers,

        -- andreas


Reply via email to