File Manager Probe

Create, move/delete/rename files and links.

Identification and Properties

Probe Type ID: file.manager

Properties:

None.

Overview

This probe performs basic local file management operations:

  • file creation (with content injection)
  • file move, deletion, renaming
  • link creation, deletion
  • file content read (the content is returned as a result choice, set to None if nothing can be read)

One of its primary purposes is providing the ability to create files on the fly from resources that were embedded in your ATS or its dependencies. This way, you may have no additional requirements on the SUT: you can embed some reference files directly into the Testerman userland instead of instructing the user to get and copy files from another source.

Availability

All platforms.

Dependencies

None.

See Also

TTCN-3 Types Equivalence

The test system interface port bound to such a probe complies with the FileManagerPortType port type as specified below:

type union FileManagementCommand
{
  CreateFileCommand createFile,
  CreateLinkCommand createLink,
  RemoveCommand remove,
  MoveCommand move,
  CopyCommand copy,
  ReadCommand read,
}

type record CreateFileCommand
{
  universal charstring name,
  octetstring content optional, // defaulted to an empty content
  boolean autorevert optional,  // backup existing file, restore it on unmap, defaulted to False
}

type record RemoveCommand
{
  universal charstring path,
}

type record MoveCommand
{
  universal charstring source,
  universal charstring destination,
}

type record CopyCommand
{
  universal charstring source,
  universal charstring destination,
}

type record CreateLinkCommand
{
  universal charstring name,
  universal charstring target,
  boolean autorevert optional, // backup existing file, restore it on unmap, defaulted to False
}

type record ReadCommand
{
  universal charstring path,
}

type record CommandStatus
{
  integer status,
  universal charstring errorMessage optional, // only if status > 0
}

type union FileManagementResponse
{
  CommandStatus status,
  universal charstring result, // for read command, null if the file could not be read
  // more to come: fileExists response, fileType response, ...
}

type port FileManagerPortType message
{
  in  FileManagementCommand;
  out FileManagementResponse;
}