Rocket Division Software http://www.starburnsoftware.com/forum/ |
|
FileTree walking http://www.starburnsoftware.com/forum/starburn-sdk-f3/filetree-walking-t2001.html |
Page 1 of 1 |
Author: | sitasoftware [ Wed Dec 02, 2009 10:03 am ] |
Post subject: | FileTree walking |
Hi folks, Antonio again. This time I would like to get the files sizes from a tree walk as I've seen that the UDF_TREE_ITEM structure has a member called m__ULONG__SizeInLogicalBlocks which is sized as a DWORD. So far so good. But, the value stored in this memeber seems to be hard to interpret: for the first file in the tree, it reports as much as 1605611120 blocks, each block of 2048 (as reported by UDF_LOGICAL_BLOCK_SIZE_IN_UCHARS) for a file which has 175013 bytes as Windows reports !! What did I miss ? Antonio. |
Author: | anton (staff) [ Wed Dec 02, 2009 10:16 am ] |
Post subject: | Re: FileTree walking |
When the tree is not built this value is not calculated yet. Could you please send a log of code trace indicating when did you manage to catch such a crazy value? |
Author: | sitasoftware [ Wed Dec 02, 2009 10:23 am ] |
Post subject: | Re: FileTree walking |
Hi Anton. No need for log as the tree walk is done BEFORE running StarBurn_ISO9660JolietFileTree_BuildImage actually. As per your comment, I guess that I must run this function first Hold on a little while and I come back with more comments. Antonio. |
Author: | anton (staff) [ Wed Dec 02, 2009 10:48 am ] |
Post subject: | Re: FileTree walking |
Exactly... OK, please let us know. |
Author: | sitasoftware [ Wed Dec 02, 2009 12:02 pm ] |
Post subject: | Re: FileTree walking |
Hi Anton, here we go again. Attached you will see: 1. StarBurn debug file "StarBurn.log" 2. "StarWave.log" 3. DIRectory listing as per "D:\DB>dir /C /S/N" (dir.txt) 4. Output log for my application program(AppLog.txt). 5. Code snippet for deletion (code.pas) Got all files ready: how to send them to you . I just read your post about logs ... You will see funny things. Order of operations: Res := StarBurn_CdvdBurnerGrabber_Create(wGraber, PCHAR(@EText[1] ), sizeof(EText), Status, @FailInfo, @SitaBurnerCallback, wDevContext, wDevice.Port,wDevice.Bus, wDevice.Target, wDevice.Lun, 64); Res := StarBurn_ISO9660JolietFileTree_Create(FTrack, PCHAR(@ErrorText[1]), sizeof(ErrorText), Status, @SitaBurnerCallback, @FTrackContext, TRUE, FALSE, // No locked files - do not keep all the handles opened all the time TRUE, // Use Level2 for ISO9660 names generation FTrackType); a series of: Res := StarBurn_ISO9660JolietFileTree_Add(FTrack, PCHAR(@ErrorText[1]), sizeof(ErrorText), Status, PChar(wPath), Nil, FILE_TIME_LAST_WRITE, FIsoRoot, NewNode); (one of then is D:\DB ) Res := StarBurn_ISO9660JolietFileTree_BuildImage(FTrack, PCHAR(@ErrorText[1]), sizeof(ErrorText), Status, 00000000, FtreeDeep, //ISO9660_TREE_LEVEL TRUE, 'Backup01', 'Sita Software', 'FBackupClient.exe'); Files deletion, (code attached as code.pas) What's wrong ? Antonio. |
Author: | anton (staff) [ Wed Dec 02, 2009 12:32 pm ] |
Post subject: | Re: FileTree walking |
Hmmm... Either I'm stupid or I don't understand where the problem is? |
Author: | sitasoftware [ Wed Dec 02, 2009 12:36 pm ] |
Post subject: | Re: FileTree walking |
Hum, quite sure you aren't stupid at all. BTW, did you get all the attachments with the last post ? If not, tell me how to send them. Antonio. |
Author: | sitasoftware [ Wed Dec 02, 2009 12:57 pm ] |
Post subject: | Re: FileTree walking |
OK let(s have an example. Windows dir reports: R‚pertoire de D:\DB 02/12/2009 13:30 <REP> . 02/12/2009 13:30 <REP> .. 11/11/2009 10:40 66.174.976 Autrebrol.gdb 01/12/2009 09:40 <REP> Backup 01/12/2009 09:40 <REP> BackupTest 01/12/2009 09:40 <REP> book 16/11/2009 13:31 6 brol_machin.xxx 11/11/2009 11:11 66.174.976 compta.fdb 02/12/2009 13:30 0 dir.txt ... R‚pertoire de D:\DB\Backup\History\svbk_2009_11_05-15_57_script01 02/12/2009 13:01 <REP> . 02/12/2009 13:01 <REP> .. 05/11/2009 15:57 2.065.920 FBACKUPCLIENT.exe 12/12/2007 01:05 356.437 fbclient.dll 05/11/2009 16:03 1ÿ452 INDEX.DBF 02/11/2009 15:58 1.674.752 Restorer.exe 05/11/2009 08:36 39 Script01.scp 17/12/2001 05:00 200.704 sde60.dll 17/12/2001 05:00 278.528 Sdentx60.dll 28/03/2007 16:03 626.088 StarBurn.dll 05/11/2009 15:57 34 TempScript.tmp 05/11/2009 16:02 175.013 z20091105155711_Backup_G_BAK_FIREBIRD.zap 10 fichier(s) 5.378.967 octets program log when adding files: Adding name "d:\db\Backup\DBssss" Adding name "d:\db\Backup\History\svbk_2009_11_05-15_57_script01\FBACKUPCLIENT.exe" Adding name "d:\db\Backup\History\svbk_2009_11_05-15_57_script01\fbclient.dll" Adding name "d:\db\Backup\History\svbk_2009_11_05-15_57_script01\INDEX.DBF" so far, so good. When walking thru the tree, application reports: ISO track ready (means StarBurn_ISO9660JolietFileTree_BuildImage has run) start delete ".*(\.[fg]db)$" Tree expand directory / Tree kid is directory d:\db Tree expand directory d:\db Removing name "d:\db\Autrebrol.gdb" Info: suppression du ficher d:\db\Autrebrol.gdb de la gravure Tree expand directory / Tree kid is directory d:\db Tree expand directory d:\db Tree kid is directory d:\db\Backup Tree expand directory d:\db\Backup Tree kid is directory d:\db\Backup\DBssss Tree expand directory d:\db\Backup\DBssss Removing name "d:\db\Backup\DBssss\New File.gDb" Info: suppression du ficher d:\db\Backup\DBssss\New File.gDb de la gravure Tree expand directory / Tree kid is directory d:\db Tree expand directory d:\db Tree kid is directory d:\db\Backup Tree expand directory d:\db\Backup Tree kid is directory d:\db\Backup\DBssss Tree expand directory d:\db\Backup\DBssss Tree kid is directory d:\db\Backup\DBssss\Youpla-boum Tree expand directory d:\db\Backup\DBssss\Youpla-boum Removing name "d:\db\Backup\DBssss\Youpla-boum\Machin.fdB" Info: suppression du ficher d:\db\Backup\DBssss\Youpla-boum\Machin.fdB de la gravure Tree expand directory / Tree kid is directory d:\db Tree expand directory d:\db Tree kid is directory d:\db\Backup Tree expand directory d:\db\Backup Tree kid is directory d:\db\Backup\DBssss Tree expand directory d:\db\Backup\DBssss Tree kid is directory d:\db\Backup\DBssss\Youpla-boum Tree expand directory d:\db\Backup\DBssss\Youpla-boum Tree kid is directory d:\db\Backup\History Tree expand directory d:\db\Backup\History Tree kid is directory d:\db\Backup\History\svbk_2009_11_05-15_57_script01 Tree expand directory d:\db\Backup\History\svbk_2009_11_05-15_57_script01 Tree kid is normal file not deleted d:\db\Backup\History\svbk_2009_11_05-15_57_script01\FBACKUPCLIENT.exe, UCHARS:28561348612083269, LB:0 Tree kid is normal file not deleted d:\db\Backup\History\svbk_2009_11_05-15_57_script01\fbclient.dll, UCHARS:27756, LB:0 Tree kid is normal file not deleted d:\db\Backup\History\svbk_2009_11_05-15_57_script01\INDEX.DBF, UCHARS:0, LB:0 Tree kid is normal file not deleted d:\db\Backup\History\svbk_2009_11_05-15_57_script01\Restorer.exe, UCHARS:25976, LB:0 Tree kid is normal file not deleted d:\db\Backup\History\svbk_2009_11_05-15_57_script01\Script01.scp, UCHARS:28771, LB:0 Tree kid is normal file not deleted d:\db\Backup\History\svbk_2009_11_05-15_57_script01\sde60.dll, UCHARS:0, LB:0 Tree kid is normal file not deleted d:\db\Backup\History\svbk_2009_11_05-15_57_script01\Sdentx60.dll, UCHARS:27756, LB:0 Tree kid is normal file not deleted d:\db\Backup\History\svbk_2009_11_05-15_57_script01\StarBurn.dll, UCHARS:27756, LB:0 Tree kid is normal file not deleted d:\db\Backup\History\svbk_2009_11_05-15_57_script01\TempScript.tmp, UCHARS:1886221358, LB:0 Tree kid is normal file not deleted d:\db\Backup\History\svbk_2009_11_05-15_57_script01\z20091105155711_Backup_G_BAK_FIREBIRD.zap, UCHARS:7008268635025650997, LB:1886743395 Tree kid is normal file not deleted d:\db\Backup\New File.txt, UCHARS:29816, LB:0 Tree kid is normal file not deleted d:\db\Backup\New File2.txt, UCHARS:7633012, LB:0 Tree kid is directory d:\db\Backup\Scripts Tree expand directory d:\db\Backup\Scripts Tree kid is normal file not deleted d:\db\Backup\Scripts\script01.scp, UCHARS:28771, LB:0 Tree kid is directory d:\db\Backup\Tmp Tree expand directory d:\db\Backup\Tmp Red lines above, are files which have been deleted from the tree. Each time, the walk has been restarted from the very beginning as reported by the log above. After those delete, have a look at the first file not deleted. Then when you compare the sizeq from Windows dir and StarBurn, where do they come from ? Antonio. |
Author: | Vitalii (staff) [ Fri Dec 04, 2009 10:10 am ] |
Post subject: | Re: FileTree walking |
Hello Antonio, First of all, we did not receive any attachments Did you send it via forum or via email? Next, correct me if i wrong, you call deletion functions AFTER calling BuildImage function. All changes to tree structure should be done before building an image. Vitalii |
Author: | sitasoftware [ Mon Dec 07, 2009 9:00 am ] |
Post subject: | Re: FileTree walking |
Hi Vitalii. Sorry for not being there last friday, I was out of the office. And yes, you're rigth: deletions must be done before building track. There is the normal sequence of operations: StarBurn_ISO9660JolietFileTree_Create StarBurn_ISO9660JolietFileTree_Add all needed files and directories StarBurn_ISO9660JolietFileTree_Remove any useless files StarBurn_ISO9660JolietFileTree_BuildImage StarBurn_ISO9660JolietFileTree_GetSizeInUCHARs get its size write it on HD StarBurn_CdvdBurnerGrabber_TestUnitReady StarBurn_CdvdBurnerGrabber_TrackAtOnceFromFile That's it. A page containg a little user's guide would have been useful. Anyway, everything works now. Thankf for help. Antonio. |
Author: | anton (staff) [ Mon Dec 07, 2009 9:07 am ] |
Post subject: | Re: FileTree walking |
Initially I'd ask to follow the samples but after I've checked lastest one myself it looks like they are outrageous and very complex |
Page 1 of 1 | All times are UTC |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |