File Services Sample: Difference between revisions

From STRIDE Wiki
Jump to navigation Jump to search
(Created page with '==Introduction== Please read the File Transfer Services article before proceeding in order to understand the concepts. This example presents a few basic examples of how to…')
 
Line 7: Line 7:
==Tests Description==
==Tests Description==


=== Basic ===


====CopyHostToTarget====
===CopyHostToTarget===


====WriteToHostTempFile====
This example shows how to [[File_Transfer_Services#srFileOpen | open a file on the host]] for read access and write all bytes to a local file. We use a temporary file buffer for writing, but any writable stream could be used as a destination.


====SeekAndTell====
===WriteToHostTempFile===


This example shows how to request a [[File_Transfer_Services#srFileGetTempName| temporary file name]] on the host and [[File_Transfer_Services#srFileWrite | write data to the file]]. We also demonstrate how to use the [[File_Transfer_Services#srFileRename|rename]] and [[File_Transfer_Services#srFileRemove|remove]] functionality.


===SeekAndTell===
This example shows how to open a file




[[Category: Samples]]
[[Category: Samples]]

Revision as of 00:06, 13 November 2009

Introduction

Please read the File Transfer Services article before proceeding in order to understand the concepts.

This example presents a few basic examples of how to use the File Transfer Services API to interact with the host filesystem from test code executing on the device. These services are only available when your code is executing under the control of the STRIDE Runner, such as when you are running Test Units.

Tests Description

CopyHostToTarget

This example shows how to open a file on the host for read access and write all bytes to a local file. We use a temporary file buffer for writing, but any writable stream could be used as a destination.

WriteToHostTempFile

This example shows how to request a temporary file name on the host and write data to the file. We also demonstrate how to use the rename and remove functionality.

SeekAndTell

This example shows how to open a file