B4J Programming Press on the image to return to the main documentation page.

rESP8266FileSystem

List of types:

ESP8266FileSystem
File

ESP8266FileSystem


Events:

None

Members:


  Close As void

  CurrentFile As File [read only]

  Exists (FileName As String) As Boolean

  Format As Boolean

  Initialize As Boolean

  ListFiles (DirName As String) As FileIterator

  OpenRead (FileName As String) As Boolean

  OpenReadWrite (FileName As String) As Boolean

  Position As ULong

  Remove (FileName As String) As Boolean

  Stream As B4RStream [read only]

  TotalSize As ULong [read only]

  UsedSize As ULong [read only]

Members description:

Close As void
Closes the current open file.
CurrentFile As File [read only]
Returns the current open file.
Exists (FileName As String) As Boolean
Checks whether the given file or directory exist.
Format As Boolean
Formats the file system. Note that this can take more than a minute to complete.
Returns True if successful.
Initialize As Boolean
Initializes the file system. Returns True if successful.
ListFiles (DirName As String) As FileIterator
Can be used in a For Each loop to iterate over the files in the folder.
Example:
For Each f As File In fs.ListFiles("/")
  Log("Name: ", f.Name, ", Size: ", f.Size)
Next
OpenRead (FileName As String) As Boolean
Opens a file in read only mode. Returns true if the file was opened successfully.
OpenReadWrite (FileName As String) As Boolean
Opens a file in read and write mode. Returns true if the file was opened successfully.
Position As ULong
Gets or sets the position in the current open file.
Remove (FileName As String) As Boolean
Deletes the given file. Returns true if the file was successfully deleted.
Stream As B4RStream [read only]
Returns the stream of the current open file.
TotalSize As ULong [read only]
UsedSize As ULong [read only]

File


Events:

None

Members:


  Name As String [read only]

  Size As ULong [read only]

Members description:

Name As String [read only]
Returns the file name.
Size As ULong [read only]
Returns the file size (number of bytes).
Top