Simulated product dispenser

Dependencies:   HTS221

Fork of mbed-cloud-workshop-connect-HTS221 by Jim Carver

Embed: (wiki syntax)

« Back to documentation index

pal_fileSystem.h File Reference

pal_fileSystem.h File Reference

PAL pal_fileSystem. This file contains the file system APIs. This is part of the PAL service API. It provides APIs to create/remove directories and open/read/write to files. More...

Go to the source code of this file.

Typedefs

typedef uintptr_t palFileDescriptor_t
 Pointer to a generic File Descriptor object.

Enumerations

enum  pal_fsOffset_t { , PAL_FS_OFFSET_SEEKSET, PAL_FS_OFFSET_SEEKCUR, PAL_FS_OFFSET_SEEKEND }
 

Enum for `fseek()` relative options.

More...
enum  pal_fsFileMode_t { , PAL_FS_FLAG_READONLY, PAL_FS_FLAG_READWRITE, PAL_FS_FLAG_READWRITEEXCLUSIVE, PAL_FS_FLAG_READWRITETRUNC }
 

Enum for fopen() permission options.

More...
enum  pal_fsStorageID_t { PAL_FS_PARTITION_PRIMARY = 0, PAL_FS_PARTITION_SECONDARY, PAL_FS_PARTITION_LAST }
 

Enum for partition access.

More...

Functions

palStatus_t pal_fsMkDir (const char *pathName)
 This function attempts to create a directory named pathName.
palStatus_t pal_fsRmDir (const char *pathName)
 This function deletes a directory.
palStatus_t pal_fsFopen (const char *pathName, pal_fsFileMode_t mode, palFileDescriptor_t *fd)
 This function opens the file whose name is specified in the parameter `pathName` and associates it with a stream that can be identified in future operations by the `fd` pointer returned.
palStatus_t pal_fsFclose (palFileDescriptor_t *fd)
 This function closes an open file object.
palStatus_t pal_fsFread (palFileDescriptor_t *fd, void *buffer, size_t numOfBytes, size_t *numberOfBytesRead)
 This function reads an array of bytes from the stream and stores it in the block of memory specified by buffer. The position indicator of the stream is advanced by the total amount of bytes read.
palStatus_t pal_fsFwrite (palFileDescriptor_t *fd, const void *buffer, size_t numOfBytes, size_t *numberOfBytesWritten)
 This function starts to write data from buffer to the file at the position pointed by the read/write pointer.
palStatus_t pal_fsFseek (palFileDescriptor_t *fd, int32_t offset, pal_fsOffset_t whence)
 This function moves the file read/write pointer without any read/write operation to the file.
palStatus_t pal_fsFtell (palFileDescriptor_t *fd, int32_t *pos)
 This function gets the current read/write pointer of a file.
palStatus_t pal_fsUnlink (const char *pathName)
 This function deletes a single file from the file system.
palStatus_t pal_fsRmFiles (const char *pathName)
 This function deletes all files and folders in a folder from the file system (FLAT remove only).
palStatus_t pal_fsCpFolder (const char *pathNameSrc, char *pathNameDest)
 This function copies all files from the source folder to the destination folder (FLAT copy only).
palStatus_t pal_fsSetMountPoint (pal_fsStorageID_t dataID, const char *Path)
 This function sets the mount directory for the given storage ID (primary or secondary),.
palStatus_t pal_fsGetMountPoint (pal_fsStorageID_t dataID, size_t length, char *Path)
 This function gets the mount directory for the given storage ID (primary or secondary), The function copies the path to the user pre allocated buffer.
palStatus_t pal_fsFormat (pal_fsStorageID_t dataID)
 This function formats the SD partition indentified by the `partitionID` parameter.
bool pal_fsIsPrivatePartition (pal_fsStorageID_t dataID)
 This function will return if the partition used by pal only or not.
void pal_fsCleanup (void)
 This function will clean all file system resources.

Detailed Description

PAL pal_fileSystem. This file contains the file system APIs. This is part of the PAL service API. It provides APIs to create/remove directories and open/read/write to files.

Definition in file pal_fileSystem.h.


Enumeration Type Documentation

Enum for partition access.

Enumerator:
PAL_FS_PARTITION_PRIMARY 

Primary partition.
.

PAL_FS_PARTITION_SECONDARY 

Secondary partition.
.

PAL_FS_PARTITION_LAST 

Must be last value.
.

Definition at line 152 of file pal_fileSystem.h.