This file systems provides pairing information so that other instances can pair to this instance.

Pairing information is provided as QR-Code and invite url as text. The following files exist:

  • /iom_invite.png: QR invite for IoM pairing - This will automatically create an IoM Request after successful pairing.
  • /iom_invite.txt: URL invite for IoM pairing - This will automatically create an IoM Request after successful pairing.
  • /iop_invite.png: QR invite for IoP pairing
  • /iop_invite.txt: URL invite for IoP pairing

Implements

Constructors

Methods

  • Change the permissions.

    Can throw:

    • FS_ERRORS.FSE-ENOENT when the parent dir does not exist or the given mode is not a file type
    • FS_ERRORS.FSE-EACCES-W if the parent directory does not have write permission

    Parameters

    • pathName: string

      The file path

    • mode: number

      The desired mode

    Returns Promise<number>

    • Returns 0 for success
  • Creates a directory.

    Can throw:

    • FS_ERRORS.FSE-ENOENT when the parent dir does not exist or the given mode is not a dir type
    • FS_ERRORS.FSE-EXISTS when the current path already exists
    • FS_ERRORS.FSE-EACCES-W if the parent directory does not have write permission

    Parameters

    • directoryPath: string

      The wanted dir path

    • dirMode: number

      The wanted mode for the wanted dir

    Returns Promise<void>

  • Creates a file otherwise

    Can throw:

    • FS_ERRORS.FSE-ENOENT when the parent dir does not exist or the given mode is not a file type
    • FS_ERRORS.FSE-EXISTS when the current path already exists
    • FS_ERRORS.FSE-EACCES-W if the parent directory does not have write permission

    Parameters

    • directoryPath: string

      The directory where the file will be saved

    • fileHash: SHA256Hash<BLOB>

      The BLOB file hash

    • fileName: string

      The file name

    • fileMode: number

      The file mode

    Returns Promise<void>

  • Reads a file in chunks by a given len and position.

    Can throw:

    • FS_ERRORS.FSE-CHUNK-R if the platform does not support chunked reading. This is supported only on Node. This happen if the check for Platform is not nodejs.
    • FS_ERRORS.FSE-ENOENT if the file does not exist
    • FS_ERRORS.FSE-EACCES-R if the file does not have read permission

    Parameters

    • filePath: string

      The file path

    • length: number
    • position: number

    Returns Promise<FileSystemFile>

    • The content of the file
  • Rename file.

    Can throw:

    • FS_ERRORS.FSE-ENOENT when the parent dir does not exist or the given mode is not a file type
    • FS_ERRORS.FSE-EACCES-W if the parent directory does not have write permission

    Parameters

    • src: string

      The src path

    • dest: string

      The dest path

    Returns Promise<number>

    • Returns 0 for success
  • Deletes a directory

    Can throw:

    • FS_ERRORS.FSE-ENOENT if the dir does not exist
    • FS_ERRORS.FSE-EACCES-W if the dir does not have write permission

    Parameters

    • pathName: string

      the directory path

    Returns Promise<number>

    Returns 0 for success

  • Creates a symlink.

    Can throw:

    • FS_ERRORS.FSE-ENOENT when the parent dir does not exist or the given mode is not a file type
    • FS_ERRORS.FSE-EXISTS when the current path already exists
    • FS_ERRORS.FSE-EACCES-W if the parent directory does not have write permission

    Parameters

    • src: string

      The src path

    • dest: string

      The dest path

    Returns Promise<void>

    • Returns 0 for success
  • Deletes a file or a symlink.

    Can throw:

    • FS_ERRORS.FSE-ENOENT if the file does not exist
    • FS_ERRORS.FSE-EACCES-W if the file does not have write permission

    Parameters

    • pathName: string

    Returns Promise<number>

    • Returns 0 for success