Jump to content

Component: File (RPI) (File): Difference between revisions

From Flowcode Help
No edit summary
No edit summary
Line 17: Line 17:
==Component Source Code==
==Component Source Code==


Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_temp/File_RPI.fcfx FC_Comp_Source_temp/File_RPI.fcfx]
Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_File_RPI.fcfx FC_Comp_Source_File_RPI.fcfx]


Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_temp/File_RPI.fcfx FC_Comp_Source_temp/File_RPI.fcfx]
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_File_RPI.fcfx FC_Comp_Source_File_RPI.fcfx]


==Detailed description==
==Detailed description==
Line 48: Line 48:


''<span style="color:red;">No additional examples</span>''
''<span style="color:red;">No additional examples</span>''





Revision as of 13:10, 7 February 2023

Author Matrix Ltd.
Version 2.7
Category File


File (RPI) component

File component allowing access to read and write files on the Raspberry Pi file system.

Component Source Code

Please click here to download the component source project: FC_Comp_Source_File_RPI.fcfx

Please click here to view the component source code (Beta): FC_Comp_Source_File_RPI.fcfx

Detailed description

No detailed description exists yet for this component

Examples

No additional examples






Macro reference

AppendByteToFile

AppendByteToFile
 
- BYTE Data
 
- BYTE Return


AppendStringToFile

AppendStringToFile
 
- STRING Data_String
 
- BYTE Return


CloseFile

CloseFile
 
- VOID Return


CreateFile

CreateFile
 
- STRING Filename
 
- BYTE Return


DeleteFile

DeleteFile
 
- STRING Filename
 
- BYTE Return


MoveToNextFileSector

MoveToNextFileSector
Not currently implemented on the RPI 
- BYTE ForceNextSector
 
- BYTE Return


OpenFile

OpenFile
Searches for and opens a file for reading or writing from within the current directory on the disk. Returns 0 for success. 
- STRING Filename
8.3 filename of the file we are trying to open e.g. "file.txt" 
- BYTE Return


OpenFolder

OpenFolder
 
- STRING Folder_Name
 
- BYTE Return


ReadByteFromFile

ReadByteFromFile
Reads a byte from the currently open file. Auto increments the position in the file. A return value of 0 may signify the end of the file has been reached (depending on the contents of the file). 
- BYTE Return


ReadByteFromIndex

ReadByteFromIndex
Reads a byte of data from the local sector buffer. Return = Data byte read from the local sector buffer.  
- ULONG Address
 
- BYTE Return


ReadFileLength

ReadFileLength
Not currently implemented on the RPI 
- INT Return


ReadFileSize

ReadFileSize
Reads the entire size of the current file in bytes. 
- ULONG Return


ReadStringFromFile

ReadStringFromFile
Reads a string from the currently open file. Auto increments the position in the file. An empty string signifies the end of the file has been reached. 
- UINT NumBytes
Maximum number of bytes to attempt to read 
- BYTE EndChar
Ends the string if the value specified is found, default is 0 
- STRING Return


SetFileIndex

SetFileIndex
 
- BYTE File_Index
Range: 0 to 4 
- VOID Return


WriteByteToBuffer

WriteByteToBuffer
Not currently implemented on the RPI 
- UINT Address
 
- BYTE Data
 
- VOID Return


WriteFileSector

WriteFileSector
Not currently implemented on the RPI 
- BYTE Return


Property reference

Properties
Root Folder
Root location on the RPI where the files will be stored 
File Count
Number of simultaneous files we want to access. 
Simulation
Sim Root Folder