The HLAPI implements the Storage File System feature in the Storage File System API.
The available methods are described in the IStorageFileSystem interface.
The files in the Storage File System API are represented in the StorageFile class.
Data can be loaded to a storage file as a byte array or as a string.
The overloaded StorageFile.ToString() method returns the data of a file in a string.
Examples
These C# examples show how to use the Storage File System API (after connecting the Intel AMT device).
Create or update file
//Create a new file when the file does not exist otherwise overwrite the data of the existing file
StorageFile myStorageFile = newStorageFile("MyStorageFile", "This is the data of MyStorageFile.");
amt.StorageFileSystem.CreateOrUpdateFile(myStorageFile);
Append file
//Append data to an existing file.
string additionalData = "This data is additional data appended to the existing file.";
amt.StorageFileSystem.AppendFile(newStorageFile("MyStorageFile",additionalData));
Get file
//Get a specific file from the Intel AMT storage.
StorageFile file = amt.StorageFileSystem.GetFile("MyStorageFile");
Get all files
//Get all the existing files from the storage.
List<StorageFile> fileList = amt.StorageFileSystem.GetAllFiles();
Delete file
//Delete a file from the Intel AMT storage.
amt.StorageFileSystem.DeleteFile("MyStorageFile");
Delete all files
//Delete all files from the storage.
amt.StorageFileSystem.DeleteAllFiles();
See Also: |
Copyright © 2006-2022, Intel Corporation. All rights reserved. |