Options
All
  • Public
  • Public/Protected
  • All
Menu

intance of the connection to an server

export

Hierarchy

  • FileSystem

Index

Constructors

Properties

_accessToken: string = null
memberof

FileSystem

_axiosInst: AxiosInstance
_data_to_send: string = ''
_home_dir: string
memberof

FileSystem

_num_inst: number
_port: string | number = '8888'
memberof

FileSystem

_protocol: string
_session_num: number = -2
_url: string = '127.0.0.1'
memberof

FileSystem

CONNECTOR_TYPE: "Node" | "Browser" = ...

conector type : Browser or Node

static
memberof

FileSystem

_XMLHttpRequest: any
_callbacks: {} = {}
static
memberof

FileSystem

Type declaration

_constructorName: string = 'FileSystem'
_cur_tmp_server_id: number = 0
static
memberof

FileSystem

_disp: boolean = false

if true, print the IO with the server

static
memberof

FileSystem

_files_to_upload: {} = {}

ref to Path waiting to be registered before sending data

static
memberof

FileSystem

Type declaration

_have_model_changed_debounced: DebouncedFunc<(() => Promise<void>)> = ...

debounce from set

static
memberof

FileSystem

_in_mk_chan_eval: boolean = false
_insts: {} = {}
static
memberof

FileSystem

Type declaration

_nb_callbacks: number = 0

functions to be called after an answer

static
memberof

FileSystem

_nb_insts: number = 0

number of instances of FileSystem

static
memberof

FileSystem

_objects: {} = {}

_server_id -> object

static
memberof

FileSystem

Type declaration

_objects_to_send: Map<number, Model> = ...

data are sent after a timeout (and are concatened before)

static
memberof

FileSystem

_ptr_to_update: {} = {}

Ptr objects that need an update, associated with FileSystem_tmp_objects

static
memberof

FileSystem

Type declaration

_send_data_to_hub_debounced: DebouncedFunc<(() => Promise<void>)> = ...

debounce from send

static
memberof

FileSystem

_sending_data: boolean = false
_sig_server: boolean = true

if true, eval server response.

static
memberof

FileSystem

_timeout_reconnect: number = 30000
static
default

30000

memberof

FileSystem

_tmp_objects: {} = {}

objects waiting for a real _server_id

static
memberof

FileSystem

Type declaration

_type_callbacks: [string, SpinalLoadCallBack<Model>][] = []
static
memberof

FileSystem

_userid: string | number = 644
deprecated
readonly
static
memberof

FileSystem

debug: boolean = false

set to true to get warning for creating unknown Model type

static
memberof

FileSystem

is_cordova: boolean = ...
static
memberof

FileSystem

onConnectionError: ((error_code: number) => void) = FileSystem._onConnectionError

Type declaration

    • (error_code: number): void
    • to be refedifined to change the handleing for connections error

      static
      memberof

      FileSystem

      Parameters

      • error_code: number

      Returns void

popup: NewAlertMsg = undefined
static
memberof

FileSystem

send_model_limit: number = 250
url_com: string = '/sceen/_'
static
memberof

FileSystem

url_upload: string = '/sceen/upload'
static
memberof

FileSystem

Methods

  • _send_data_to_hub_instance(): Promise<void>
  • _send_make_channel(): Promise<string>
  • make dir if not already present in the server. Call callback as in the @load proc -- when done (i.e. when loaded or created)

    memberof

    FileSystem

    Parameters

    • dir: string

    Returns Promise<Directory<any>>

    {Promise}

  • make dir if not already present in the server. Call callback as in the @load proc -- when done (i.e. when loaded or created)

    memberof

    FileSystem

    Parameters

    Returns void

  • load_or_make_dirProm(dir: string): Promise<Directory<any>>
  • load_ptr<T>(ptr: number): Promise<T>
  • load_ptr<T>(ptr: number, callback: SpinalLoadCallBack<T>): void
  • load an object using is pointer and call $callback with the corresponding ref

    memberof

    FileSystem

    Type Parameters

    Parameters

    • ptr: number

    Returns Promise<T>

    {Promise}

  • load an object using is pointer and call $callback with the corresponding ref

    memberof

    FileSystem

    Type Parameters

    Parameters

    Returns void

  • make_channel(): void
  • send a request for a "push" channel. Called in the server response

    memberof

    FileSystem

    deprecated

    Returns void

  • make_channel_eval(responseText: string): void
  • make_channel_loop(): Promise<void>
  • send(data: string): void
  • send_data_eval(responseText: string): void
  • share_model(ptr: number | Model, file_name: string, share_type: number, targetName: string): void
  • _create_model_by_name(name: string): any
  • _get_chan_data(): string
  • _get_new_tmp_server_id(): number
  • _model_changed_func(): Promise<void>
  • _my_xml_http_request(): any
  • _onConnectionError(error_code: number): void
  • default callback on make_channel error after the timeout disconnected reached This method can be surcharged. error_code :

    • 0 = Error resolved
    • 1 = 1st disconnection
    • 2 = disconnection timeout
    • 3 = Server went down Reinit everything
    • 4 = Server down on connection
    static
    memberof

    FileSystem

    Parameters

    • error_code: number

    Returns void

  • _send_chan(): void
  • _send_data_to_hub_func(): Promise<void>
  • _timeout_send_func(): void
  • _tmp_id_to_real(tmp_id: number, res: number): Promise<void>
  • extend(_child: any, _parent: any): any
  • signal_change(m: Model): void

Generated using TypeDoc