Le 26/04/2012 14:57, Koenraad Lelong a écrit :
Hi,

I would like to make an application to centrally store documents. I will put a reference to the location in a Firebird database, so I can retrieve (and show) the document.
This could lead to very big directories and I don't know any OS who loves this. This situation generalyy leads to a drastic preformance loose.
I will let the user specify the source document, then the application will copy the document to the central location. So, I wonder if there is an OS-independent way to copy files.
In fact input and output files depend on how your program access them. I guess that Win and Linux are mixed. In this case one solution is to use UNC and SMB sharing system on both sides: Windows folder share and Linux Samba server.
I could do block-read/block-writes, but is this the most efficient way ? Or should I use an os-dependent call of the copy command ? Or something else ?
Using FPC, it is very easy to manage this with a pair of TFileStream provided each of them has an appropriate file path depending on the OS.
I could store the documents in the database, but I never worked with blobs so I will try this in a next version.
It is quite easy to use blobs (either binary or text) most of the times. What components set do you plan to use ? Lazarus SQLdb works very well in both 32 and 64 bit. Prodigy UIB components do the same work.


Comments, tips, etc. are welcome.

Thanks,

Koenraad Lelong.

--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus




--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to