gws_core

Introduction
Getting Started
Developer guide
Release
Architecture
CLI
Technical documentations
Version

FileRField

Abstract class that must be extended to define RField that are dump and load directly into a file

Attributes
include_in_dict_view: boolsearchable: bool
Functions
__init__
default_value : Any
default value of the resource attribute Support primitive value, Type of Callable function If type or callable, it will be called without parameter to initialise the default value
deserialize
r_field_value : str
Return type : Any
dump_to_file

Implement this method to dump your object into a file to be able to load it later. This method is called when the resource is saved.

r_field_value : Any
object to dump (value of the r_field)
file_path : str
path of the file to dump (the object MUST be dumped into this file)
get_default_value
Return type : Any
load_from_file

Implement this method to load your object from the file. This method is called when the RField of the resource is loaded.

file_path : str
path of the file
Return type : Any
serialize

METHOD NOT USED. Ignore this method.

r_field_value : Any
Return type : str