![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Expert Programmer
Join Date: Dec 2004
Posts: 794
Rep Power: 4
![]() |
file output question
How can I add a few bytes to the beginning of a file? Specifically, I want to change this file:
plane0 { Properties 0 { initialShadingGroup1 { Name "initialShadingGroup1" Filename "plane/plane_0" Type 0 Prop MaterialType 2 UNLIT } } into this: 000plane0 { Properties 0 { initialShadingGroup1 { Name "initialShadingGroup1" Filename "plane/plane_0" Type 0 Prop MaterialType 2 UNLIT } } by adding 000 at the beginning. Any ideas? |
|
|
|
|
|
#2 |
|
Programmer
Join Date: Dec 2004
Posts: 87
Rep Power: 4
![]() |
Uh, why?
|
|
|
|
|
|
#3 |
|
Expert Programmer
Join Date: Dec 2004
Posts: 794
Rep Power: 4
![]() |
It's a *really* long story. Can you please just tell me how to do it?
|
|
|
|
|
|
#4 |
|
Hobbyist Programmer
Join Date: Dec 2004
Location: a cardboard box
Posts: 118
Rep Power: 4
![]() |
I think theres a command for it. I'll check it out tommorrow.
But you could just copy the whole file into a linklist or something, clear the file, add the 000, write that stuff back in. But I think there may be an easier way as mentioned before.
__________________
... |
|
|
|
|
|
#5 |
|
Expert Programmer
Join Date: Dec 2004
Posts: 794
Rep Power: 4
![]() |
I have decided to just read in the whole file, write the "000", then write out the whole file. Thanks for the help, but I don't need it anymore.
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|