Please enable JavaScript to view this site.

Saving a generic file from the specified source flash to a local file.

Syntax

flashFileSave(string source, string target, uint flags, uint @nackx, uint gid=0): bool

source

Name of the source file on the flash

target

Name of the local target file

flags

Save settings

nackx

Reference to any extended NACK code, in case of error

gid

Identifier of any graphical percentage element to be used, which can be created with the addGauge() function

Result

Returns logical outcome operazone

Valid settings (flags) for the function are as follows:

Flag

Description

flashFileSave_Overwrite.

Overwrite of the target file, if it already exists

flashFileSave_Recover

Attempts save recovery there where interrupted: if not possible performs a save from scratch.

flashFileSave_NoBif16.

Disables BIF16 handling (RRT and old handlers only).

Annotation:

The source file must mandatorily specify the source flash path.

The destination file, if the filename is relative, considers the current path to be that of the current workspace. If you want to reference the current shell path, which may be different from the workspace path, use the dirBase() function.

The extended NACK code contains the actual NACK code in loWord(nackx) and any additional information in hiWord(nackx).

Example of use

To save the RTE.CFG file from the /FA/ folder, considering the target file in the shell base path.

uint nackx

uint gid = addGauge ()

if (flashFileSave ("/fa/rte.cfg", dirBase () + "/rte.cfg", 0, @nackx, gid))

  ; TODO: save ok

else

  printNack (nackx)

  ; TODO: error handling

end

 

  

Keyboard Navigation

F7 for caret browsing
Hold ALT and press letter

This Info: ALT+q
Page Header: ALT+h
Topic Header: ALT+t
Topic Body: ALT+b
Contents: ALT+c
Search: ALT+s
Exit Menu/Up: ESC