File Management

Introduction

This sample shows file management functions, such as creating a file, changing a file name, writing a file, reading a file, and deleting a file.

Usage

  1. Touch Create fileIo to create a file. After the file is created successfully, the absolute path of the file is displayed.

  2. Touch Rename fileIo to change the file name. After the operation is successful, the absolute path of the new file is displayed.

  3. Touch Write fileIo to write data to the file. After the data is written, the content written is displayed.

  4. Touch Read fileIo to read file information. After the operation is successful, the content read is displayed.

  5. Touch Delete fileIo to delete the file. A message is displayed, indicating that the file is deleted successfully.

Constraints

This sample can only be run on standard-system devices.