34 internal abstract class VfsFile : VfsEntry
41 public VfsFile(VfsContext context) :
50 public abstract long Size {
get; }
58 public virtual bool CanOpen(FileMode mode, FileAccess access)
60 return mode == FileMode.Open && access == FileAccess.Read;
69 public virtual Stream Open(FileMode mode, FileAccess access)
71 return CanOpen(mode, access) ? OpenRead() : throw new UnauthorizedAccessException(
"Access to the file was denied. The IKVM VFS currently only supports read operations.");
78 protected virtual Stream OpenRead()
80 throw new NotSupportedException();