#1 Burning Software

It is currently Tue Apr 16, 2024 9:32 pm

All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: GetFileObject does not work as expected
PostPosted: Fri Apr 30, 2010 10:05 am 
Offline

Joined: Sun Jun 14, 2009 6:00 pm
Posts: 542
Hi,

the GetFileObject method does not seem to work. At least, I haven't been able to figure it out:

Code:
// Bug
dataBurner.CreateFolder("videos");
object test = dataBurner.GetFileObject("videos");
// --> null
test = dataBurner.GetFileObject("\\videos"); // according to docs
// --> null


Expected:
GetFileObject() returns a reference to the DataFolder object.

Actual result:
It doesn't seem to be possible to get a reference to any existing directories in order to add new files. Result is always null.


Top
 Profile  
 
 Post subject: Re: GetFileObject does not work as expected
PostPosted: Fri Apr 30, 2010 2:31 pm 
Offline

Joined: Thu Dec 13, 2007 8:44 am
Posts: 609
Hello

1) "object test = dataBurner.GetFileObject("videos");" - you are searching the FILE named "videos" in the root of the files tree;
2) "object test = dataBurner.GetFileObject("videos\");" - you are searching the FOLDER named "videos" in the root of the files tree;

:)

Regards,

Dmitry


Top
 Profile  
 
 Post subject: Re: GetFileObject does not work as expected
PostPosted: Fri Apr 30, 2010 3:21 pm 
Offline

Joined: Sun Jun 14, 2009 6:00 pm
Posts: 542
Hm...can there ever be a file AND a folder "videos"?


Top
 Profile  
 
 Post subject: Re: GetFileObject does not work as expected
PostPosted: Fri Apr 30, 2010 3:57 pm 
Offline

Joined: Thu Dec 13, 2007 8:44 am
Posts: 609
It was made to optimize the searching process ...

So .. if you are trying to search the videos folder you should append the "\" symbol at the end of path ... is it problem for you to do that?


Regards,

Dmitry


Top
 Profile  
 
 Post subject: Re: GetFileObject does not work as expected
PostPosted: Fri Apr 30, 2010 4:24 pm 
Offline

Joined: Sun Jun 14, 2009 6:00 pm
Posts: 542
OK, it works fine then, thanks. Can be confusing though.


Top
 Profile  
 
 Post subject: Re: GetFileObject does not work as expected
PostPosted: Fri Apr 30, 2010 4:47 pm 
Offline

Joined: Thu Dec 13, 2007 8:44 am
Posts: 609
Ok, It's good!

P.s. I think we can simplify this behaviour ... by ignoring the latest token "\" :)

Regards,

Dmitry


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 7 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