DGL
https://delphigl.com/forum/

virtual file system for pascal/delphi
https://delphigl.com/forum/viewtopic.php?f=13&t=7985
Seite 1 von 1

Autor:  noeska [ Mi Nov 26, 2008 19:27 ]
Betreff des Beitrags:  virtual file system for pascal/delphi

What is a Virtual File System? See VFS

Thanks to a question of Brainer on the pgd forum ( http://www.pascalgamedevelopment.com/vi ... sc&start=0 ) i started writing a virtual file system in pascal. Things now become useable.

2008-12-29: Beta1 is Released. So it needs beta testers.

2008-12-21: Alpha9 is released. When a (virtual)file becomes smaller additional blocks are marked as deleted. Should work, but needs additional testing. If this goes ok it is almost time for an real beta version.

Alpha8 is here. ReadData and Write are now rewritten to use the TVirtualFileStream instead of writing blocks directly. Both routines are now only 4 lines long :-)

Now it is alpha 7 time already. Now it is also possible to delete files. Deleted blocks are reused again.
This only works for tvirtualfilestream bases access to the tvirtualfilesystem. So writedata (and readdata) need to be rewritten to use a tvirtualfilestream. Besides making reusing deleted blocks work with those it save some double code.
With reusing deleted block the tvirtualfilesystem may end up to be defragmented. Hmm how to write such an thing?

Who are willing to give this alpha version a test run? It comes with an basic example i use for testing.
I still have to give the virtualfilesystem a proper name and i am out of ideas so suggestions are welcome.

Download: http://noeska.net/projects/files/2008/12/nvfs.zip

A short tutorial:

Opening a virtual file system.
Code:
  1.  
  2.   TestDataFile := TVirtualFileSystem.Create();
  3.   TestDataFile.FileName := 'myfilesystem.dat';
  4.   TestDataFile.Open;
  5.  


Writing a tmemo (mTest) inside the virtual file system:
Code:
  1.  
  2.   MyStream:= TvfsFileStream.Create('test.txt', TestDataFile);
  3.   mTest.Lines.SaveToStream(MyStream);
  4.   MyStream.Free;
  5.  


Reading a tmemo (mTest) from inside the virtual file system:
Code:
  1.  
  2.   MyStream:= TvfsFileStream.Create('test.txt', TestDataFile);
  3.   mTest.Lines.LoadFromStream(MyStream);
  4.   MyStream.Free;
  5.  


Post your feedback and name suggestion here: viewtopic.php?t=7986

Autor:  noeska [ So Dez 21, 2008 21:34 ]
Betreff des Beitrags: 

2008-12-21: Alpha9 is released. When a (virtual)file becomes smaller additional blocks are marked as deleted. Should work, but needs additional testing. If this goes ok it is almost time for an real beta version.

Download: http://www.noeska.net/downloads/Virtual ... Alpha9.zip

Autor:  noeska [ Mo Dez 29, 2008 17:20 ]
Betreff des Beitrags: 

The vfs has a name. Not the most original, but it has a name now and it is: nvfs . Or in full: Noeska's Virtual File System .
The project site is being setup now. (ps it almost took me more time to setup wordpress mu then to write nvfs :-) )

Project Site: http://www.noeska.net/projects/nvfs/
Download version 1.0b: http://www.noeska.net/projects/files/2008/12/nvfs.zip

The basics are working now so i took it out of alpha and into beta.

I need beta testers now. So test it if you dare...

Seite 1 von 1 Alle Zeiten sind UTC + 1 Stunde
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/