This page introduces the Salome_file feature. Salome_file is based on the SALOME_FileTransfer. It extends it to enable a higher model for managing files into SALOME applications.
Salome_file is a CORBA object. It's role is to managed many system files. When a Salome_file is created, no files are managed. Then, files are added using Salome_file_i interface. A file is represented by a name and a path.
There is two different cases when a file is added :
To be able to get a distributed file, the Salome_file has to be connected with an another Salome_file that managed this file. This distributed Salome_file could be located into a distributed resource.
This section shows a simple example of the use of Salome_file. The objective is to create two Salome_file; one is managing a local file, the other is managing a distributed file. Then, these Salome_files are connected to enable the copy of the real file gbetween the two Salome_files.
Firstly, two Salome_files are created :
Secondly, the real files are registered into the Salome_files.
Thirdly, we connect the destination file with the source file :
Finally, the file is sended using Salome_file interface.
This advanced example illustrates a part of the Salome_file API dedicated for situations where multiple files are managed.
This is the situation :
There is two problems in this case.
The first problem is in the file_dest Salome_file, there is two files. If the method connect is used, the Salome_file cannot know if the reference is for cat_copy or echo_copy. Indeed echo_copy could be provided by another Salome_file that for cat_copy.
The second problem comes from the two files of file_source_a Salome_file. Indeed when connect is used, there is no information about the choice of the source file into the source Salome_file. For cat_copy, did the used want cat or echo ?
To avoid these cases, Salome_file API provides advanced methods :