3 using System
.Collections
;
6 using Mono
.Unix
.Native
;
13 abstract public class FileObject
: FileSystemObject
{
17 timestamp
= FileSystemObject
.PickTimestamp ();
20 abstract public void AddToStream (Stream stream
, EventTracker tracker
);
22 override public void AddOnDisk (EventTracker tracker
)
25 stream
= new FileStream (FullName
,
29 AddToStream (stream
, tracker
);
32 // Stamp the right timestamp onto the file
34 info
= new FileInfo (FullName
);
35 info
.LastWriteTime
= Timestamp
;
38 override public void DeleteOnDisk (EventTracker tracker
)
40 Syscall
.unlink (FullName
);
41 // FIXME: adjust tracker
44 override public void MoveOnDisk (string old_full_name
, EventTracker tracker
)
46 Syscall
.rename (old_full_name
, FullName
);
47 // FIXME: adjust tracker
50 override public bool VerifyOnDisk ()
52 if (! File
.Exists (FullName
)) {
53 Log
.Failure ("Missing file '{0}'", FullName
);