[Oberon] FPGA Oberon - Lost file reclaim storage

thomas.kral at email.cz thomas.kral at email.cz
Wed Mar 22 19:14:37 CET 2017


Hi Joerg,



Interesting, is this a recursive directory traverse?

It indeed reports one the files in question and its sector(start?) number.




Tomas




---




Recoded for revised FPGA (V7?) Oberon as below, still struggling a bit with 
terminology. 





MODULE MyDir;

  IMPORT Texts, FileDir, Oberon;

  VAR W: Texts.Writer;




  PROCEDURE List(name: FileDir.FileName; sec : INTEGER; VAR cont: BOOLEAN);

  BEGIN

     Texts.WriteString(W, name); Texts.WriteInt(W, sec, 6);

     Texts.WriteLn(W);

     cont := TRUE

  END List;

 

  PROCEDURE Do*;

  BEGIN 

    FileDir.Enumerate("", List); Texts.Append(Oberon.Log, W.buf)

  END Do;




BEGIN Texts.OpenWriter(W);

END MyDir.




---------- Původní zpráva ----------
Od: Jörg <joerg.straube at iaeth.ch>
Komu: 'ETH Oberon and related systems' <oberon at lists.inf.ethz.ch>
Datum: 22. 3. 2017 18:04:00
Předmět: Re: [Oberon] FPGA Oberon - Lost file reclaim storage

"


Thomas

 

Can you still enumerate the corrupted file?

I mean, will this program find your file?

 

MODULE myDir

 

IMPORT FileDir, Out;

 

PROCEUDRE List(name: FileDir.FileName; sec: INTEGER; VAR cont: BOOLEAN);

            BEGIN

                        Out.String(name); Out.Int(sec, 12); Out.Ln;

                        cont := TRUE

            END List;

 

PROCEDURE Do*;

            BEGIN

                        FileDir.Enumerate(“”, List)

            END Do;

BEGIN

END myDir.Do

 

 


 
 From: Oberon [mailto:oberon-bounces at lists.inf.ethz.ch] On Behalf Of thomas.
 kral at email.cz
 Sent: Dienstag, 21. März 2017 09:53
 To: ETH Oberon and related systems <oberon at lists.inf.ethz.ch>
 Subject: [Oberon] FPGA Oberon - Lost file reclaim storage
 


 

Hi,


 



On a very rare occasion, I happened to produce a file that has a corrupt 
header, wherby a dot '.' in its name is replaced by an invisible character.



 



Subsequent writing to the same file name resolved the situation and file was
created normally. 



 



Now I am just thinking how I can reclaim the storage taken up by that lost 
file. Delete on its name fails, as the system does not see it as a regular 
file. 



 



Tomas



-- 
Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related systems 
https://lists.inf.ethz.ch/mailman/listinfo/oberon 
"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.inf.ethz.ch/pipermail/oberon/attachments/20170322/cc956c24/attachment.html>


More information about the Oberon mailing list