What is Peach
Installing
Tutorials
Methodology
Introduction
FAQ
Peach 3
Peach Pits
 General Conf
 Data Modeling
 State Modeling
 Agents
  Monitors
 Test
  Publishers
  Loggers
Running
Minset
Peach 2.3

License

File Publisher

The File publisher will open a file for reading or writing.

Parameters

  • FileName — Name of file to open

  • Overwrite — Overwrite existing files (optional, defaults to true)

  • Append — Append data to existing file (optional, defaults to false)

Actions

  • output — Data to be written to file

  • input — Data to be read from file

Examples

Write to file
<DataModel name="Data">
   <!-- ... -->
</DataModel>

<StateModel name="TheState">
  <State name="initial">
    <Action type="output">
      <DataModel ref="Data" />
    </Action>
  </State>
</StateModel>

<Test name="Default">
  <!-- ... -->
  <Publisher class="File">
    <Param name="FileName" value="fuzzed.bin" />
  </Publisher>
</Test>
Read from file
<DataModel name="Data">
   <Blob/>
</DataModel>

<StateModel name="TheState">
  <State name="initial">
    <Action type="input">
      <DataModel ref="Data" />
    </Action>
  </State>
</StateModel>

<Test name="Default">
  <!-- ... -->
  <Publisher class="File">
    <Param name="FileName" value="fuzzed.bin" />
  </Publisher>
</Test>