Show / Hide Table of Contents

    Class FileStorage

    Class with methods to use internal flash storage space.

    Inheritance
    System.Object
    FileStorage
    Implements
    System.IDisposable
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Eclo.nF.SIM800H
    Assembly: cs.temp.dll.dll
    Syntax
    public class FileStorage : IDisposable

    Methods

    CreateFile(String)

    Create an empty file in the file storage

    Declaration
    public bool CreateFile(string fileName)
    Parameters
    Type Name Description
    System.String fileName

    File name including full path.

    Returns
    Type Description
    System.Boolean

    True when file was successfully created. False otherwise.

    DeleteFile(String)

    Deletes a file from the file storage

    Declaration
    public bool DeleteFile(string fileName)
    Parameters
    Type Name Description
    System.String fileName

    File name including full path.

    Returns
    Type Description
    System.Boolean

    True if the file was successfully deleted. False otherwise.

    Dispose()

    Declaration
    public void Dispose()

    Dispose(Boolean)

    Declaration
    protected virtual void Dispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing

    GetAvailableStorage()

    Returns available storage space.

    Declaration
    public int GetAvailableStorage()
    Returns
    Type Description
    System.Int32

    File available storage space in bytes or -1 if size couldn't be determined.

    GetFileSize(String)

    Returns the file size in bytes.

    Declaration
    public int GetFileSize(string fileName)
    Parameters
    Type Name Description
    System.String fileName

    File name including full path.

    Returns
    Type Description
    System.Int32

    File size in bytes or -1 if size couldn't be read or doesn't exist.

    ReadFile(String)

    Read a file from the file storage

    Declaration
    public string ReadFile(string fileName)
    Parameters
    Type Name Description
    System.String fileName

    File name including full path.

    Returns
    Type Description
    System.String

    File contents or NULL if file is empty or doesn't exist.

    WriteFile(String, String)

    Writes content to a storage file. Content must be plain string without \r \n chars.

    Declaration
    public bool WriteFile(string fileName, string content)
    Parameters
    Type Name Description
    System.String fileName

    File name including full path.

    System.String content

    File content.

    Returns
    Type Description
    System.Boolean

    True if file was successfully written. False otherwise.

    Implements

    System.IDisposable
    Back to top Copyright © 2018 Eclo Solutions
    Generated by DocFX