#1 Burning Software

It is currently Fri Dec 20, 2024 4:06 am

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Adding files to Disc - StarBurnX
PostPosted: Thu Jan 15, 2009 3:47 pm 
Offline

Joined: Sat Dec 20, 2008 3:17 pm
Posts: 23
I need to be able to a specified folder to the disc which i can do, but i also need to be able to create a new directory and then add more folders and files to this new directory.

I have looked through the DataBurner sample project, but do not know how to do this.

Can someone please help.

I am using vb.net

Lloyd

**sample code**
'Initalise
Dim m_dataBurner As RocketDivision.StarBurnX.DataBurner = New RocketDivision.StarBurnX.DataBurnerClass

'Add folders in root dir
m_dataBurner.AddDirectory(FolderToBurn)

'Add new folder
m_dataBurner.CreateFolder("NewStuff")


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 15, 2009 5:35 pm 
Offline

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

Lloyd,

1) Function AddDirectory (CreateFolder) returns the IDataFolder object. If you wish to add files/folders into added (created) directory you should call the AddDirectory (CreateFolder) method on this IDataFolder object.

' Create new root folder
dim newFolder as IDataFolder

set newFolder = m_dataBurner.CreateFolder("NewStuff")

' Append sub items ...
newFolder.CreateFolder("NewStuff2")
newFolder.AddDirectory("NewStuff2")

etc...

2) If you wish to add a folder to the folder which is present somewhere in the StarBurnX tree you should find the IDataFolder object which is linked with existing folder. The IDataFolder interface provides the method GetFileObject.

Dim parentFolder As IDataFolder
Dim objSelectedItem As IDataFile

' Get a parent folder for a removed file
parentFolder = m_dataBurner.GetFileObject("\Folder1\Folder2\")

' Get a file object wich will be removed
objSelectedItem = dataBurner.GetFileObject("\Folder1\Folder2\File1.test")



Regards,

Dmitry Bortsov

Rocket Division Software


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 15, 2009 6:51 pm 
Offline

Joined: Sat Dec 20, 2008 3:17 pm
Posts: 23
Excellent, thats just what i needed.
Easy when you know how

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 15, 2009 7:49 pm 
Offline
Site Admin

Joined: Fri Jun 18, 2004 12:03 am
Posts: 4089
Location: British Virgin Islands
Please keep us updated if you'd have any issues.

Lloyd Quenby wrote:
Excellent, thats just what i needed.
Easy when you know how

Thanks


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 5 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