#1 Burning Software

It is currently Thu Apr 25, 2024 8:32 pm

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: How to distinguish folder from file in a FileTree?
PostPosted: Tue Mar 22, 2005 3:53 pm 
Offline

Joined: Mon Mar 21, 2005 12:31 pm
Posts: 6
Hi!
I wanna show in my GUI file tree information that already exists on a disk.
I intend to do this in a such way:
I will import existing track with StarBurn_ISO9660JolietFileTree_ImportTrack(). Then I'll traverse resulting tree and call StarBurn_ISO9660JolietFileTree_GetNames to get names for a node. But how can I distinguish is some ending node refers to a file or to an empty folder and reflect it in my GUI file tree? In other cases I can distinguish folders by presence of the kids. May be I should use StarBurn_ISO9660JolietFileTree_GetAttributes()? But it is not described in the SDK which attributes packed in the resulting value of this function..

Explain me solution of this problem, please :?


Top
 Profile  
 
 Post subject: Re: How to distinguish folder from file in a FileTree?
PostPosted: Tue Mar 22, 2005 7:57 pm 
Offline

Joined: Mon May 31, 2004 6:22 am
Posts: 134
Alexander wrote:
Hi!
I wanna show in my GUI file tree information that already exists on a disk.
I intend to do this in a such way:
I will import existing track with StarBurn_ISO9660JolietFileTree_ImportTrack(). Then I'll traverse resulting tree and call StarBurn_ISO9660JolietFileTree_GetNames to get names for a node. But how can I distinguish is some ending node refers to a file or to an empty folder and reflect it in my GUI file tree? In other cases I can distinguish folders by presence of the kids. May be I should use StarBurn_ISO9660JolietFileTree_GetAttributes()? But it is not described in the SDK which attributes packed in the resulting value of this function..
Explain me solution of this problem, please :?


Hi,

Yes, you are right. You should use StarBurn_ISO9660JolietFileTree_GetAttributes to get the node attributes. And then compare it with FILE_ATTRIBUTE_DIRECTORY.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 23, 2005 1:37 pm 
Offline

Joined: Mon Mar 21, 2005 12:31 pm
Posts: 6
Thank you Alexey! I understood. Simply it wasn't obvious from the SDK help that StarBurn_ISO9660JolietFileTree_GetAttributes returns WIN32API structure with attributes.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 23, 2005 3:40 pm 
Offline
Site Admin

Joined: Fri Jun 18, 2004 12:03 am
Posts: 4089
Location: British Virgin Islands
We'll update docummentation - thank you for pointing. And please keep in mind - you need to compare for set bit and not for exact meaning. I mean do:

if ( dwAttributes & FILE_ATTRIBUTE_DIRECTORY )

and not like this:

if ( dwAttributes == FILE_ATTRIBUTE_DIRECTORY )

b/s directories also could have hidden and archive bits set. FYI.

P.S. And I'm still checking what's wrong with the logs you've kindly sent to us...

Alexander wrote:
Thank you Alexey! I understood. Simply it wasn't obvious from the SDK help that StarBurn_ISO9660JolietFileTree_GetAttributes returns WIN32API structure with attributes.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 37 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group