|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Moving Folders/Files to .dat file?
Hi guys,
I am wondering if it's possible to place all the folders and files (keeping path locations) to a single data file? If so, any references? |
|
#2
|
|||
|
|||
|
It is possible. You need to define your own data file format and use it to store individual files. Use file streams (TFileStream) to read individual files and copy them to a single container. Obviosly, if you just copy them one by one, you won't have any way of knowing where each file starts. That's why you need to define a data file format. For example you can add a header before each of the files, that contains the file size, file name and its location. That way you'd first read the header, find out where your file starts and ends in the container and its actual path.
|
|
#3
|
|||
|
|||
|
Thanks for that, murklys.
Googling :-) |
|
#4
|
|||
|
|||
|
Just google for the following things:
TFileStream TRecord (especially how to write records to filestreams) And all you have to do then is figure out a simple way of telling your program how to read your container (that totally depends on you) Good luck |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Delphi Programming > Moving Folders/Files to .dat file? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|