Delphi Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreDelphi Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 20th, 2009, 03:07 AM
Lotosus.com Lotosus.com is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2008
Posts: 42 Lotosus.com User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 35 m 35 sec
Reputation Power: 2
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?

Reply With Quote
  #2  
Old June 20th, 2009, 04:01 AM
murklys murklys is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2008
Posts: 351 murklys User rank is Sergeant (500 - 2000 Reputation Level)murklys User rank is Sergeant (500 - 2000 Reputation Level)murklys User rank is Sergeant (500 - 2000 Reputation Level)murklys User rank is Sergeant (500 - 2000 Reputation Level)murklys User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 2 Days 15 h 7 m 11 sec
Reputation Power: 21
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.

Reply With Quote
  #3  
Old June 23rd, 2009, 06:07 AM
Lotosus.com Lotosus.com is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2008
Posts: 42 Lotosus.com User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 35 m 35 sec
Reputation Power: 2
Thanks for that, murklys.

Googling :-)

Reply With Quote
  #4  
Old June 23rd, 2009, 09:56 AM
murklys murklys is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2008
Posts: 351 murklys User rank is Sergeant (500 - 2000 Reputation Level)murklys User rank is Sergeant (500 - 2000 Reputation Level)murklys User rank is Sergeant (500 - 2000 Reputation Level)murklys User rank is Sergeant (500 - 2000 Reputation Level)murklys User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 2 Days 15 h 7 m 11 sec
Reputation Power: 21
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

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreDelphi Programming > Moving Folders/Files to .dat file?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump




 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 




© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 6 Hosted by Hostway
Stay green...Green IT