[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question about sftp_attributes


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


References:
Question about sftp_attributesAlan Ong <sarcasigan@xxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org