I make backup of persistant on sd card, with date and hour name, with AppStoreRetainsInFile.
Question 1: is it possible to store backup files on external USB flash disk ?
Question 2: I would like to choose with webvisu, which backup file I have to restore, with AppRestoreRetainsFromFile. How to make chooser of file ?
1- How ? On raspberry, it's : "/mnt/sdb1" ?
I use this code:
fbDelete : FILE . Delete ; (* bloc pour effacer le contenu du
sFileName : STRING := 'data.ret' ;
pApp : POINTER TO APPLICATION ;
Result : RTS_IEC_RESULT ;
xInit : BOOL ;
RESTORE : bool ;
//CmpApp + CAA File + SysTypes Interfaces
IF NOT xInit THEN
pApp := AppGetCurrent ( pResult := ADR ( Result ) ) ;
xInit := TRUE ;
RESTORE := TRUE ;
PERSIST_RESTAUREES := FALSE ;
IF SAUVEGARDER = TRUE AND NOT RESTORE THEN
fbDelete ( xExecute := TRUE , sFileName := sFileName ) ;
IF fbDelete . xDone OR ( fbDelete . xError AND fbDelete . eError = File .Error . NOT_EXIST ) THEN
fbDelete ( xExecute := FALSE ) ;
IF pApp <> 0 THEN
Result := AppStoreRetainsInFile ( pApp , sFileName ) ;
IF RESTORE THEN
Result := AppRestoreRetainsFromFile ( pApp , sFileName ) ;
I have to specify ?```
sFileName : STRING := '/mnt/sdb1/data.ret' ;
2- I don't understand how to use dialogs.fileopensave ?
I put it on vizualisation ? And after? Which configuration of it ?
Or I create a button, on mouseclick, I call dialog box fileopensave ? But What I have to set about:
parameter : filelistprovider; type: VISU_FBFILELISTPROVIDER; Value : ????
Point 1 :
I do auto mount usb disk on /media/usb with user pi.
On sFilename I do: '/media/usb/data.ret'. It work.
And for point 2: I need help !
I analyse example VisuDialogST, but the second application which can help me, doen't work. Please help me !
Edwin, could you help me !?!
Log in to post a comment.