RobotStudio event

LocalDirectory persistent?

Options
Hello,

I'm creating a file (App.Log) int the LocalDirectory (with GetFile()).
In the Virtual FP i can see this file in /INTERNAL, but in real FP i cant see it.

In real FP it should be in /TEMP, but not.

Question: Is the LocalDirectoy persistent or is volatile?

Thanks
Marcos Foglino

Comments

  • carlosmtz2000
    Options

    Hola Marcos,

    This is a property that you can get or set for the FileSystem instance that you have for each Controller instance. You can set some predefined values. This is explained in the FP User's guide:

    Environment variables: "When specifying file system paths you can use environment variables to denote the HOME, system, backup and temp directories of the currently used system. When an application uses "(BACKUP)$" it is internally interpreted as the path to the backup directory of the current system. The other environment variables are: HOME, TEMP and SYSTEM. "

     

    Saludos/Carlos

    Carlos Martinez
    ABB


  • Carlos, thanks for you information.
    But my question is:

    Is the LocalDirectoy persistent or is volatile?

    Because, i cant find the App.log in any folder in the real FP.

    thanks
    Marcos

  • RussD
    Options
    I think it gets initialized to the same value each time the FP starts, it doesn't change unless you explicitly change it. You can use the remote file viewer to look at the contents of the FP ramdisk. Note that the file itself will be gone as soon as the FP is restarted because it is not possible to store files on the device.
    Russell Drown
  • carlosmtz2000
    Options

    Hi,

    Sorry ...  you were referring to the LocalDirectory, not the Remote one. If I remember correctly, the value of thar property is only valid for that instance. If you create a new Controller class, then the default value should be '/Temp/'.

    Have you tried to set the Local Directory just after getting the FileSystem, so it guaranteed that you are working in this FP directory.

    Carlos

     

     

    Carlos Martinez
    ABB
  • Thanks, Carlos and Russ.

    So, i can create a file on real FP?

    I am using Log4net to log application actions.

    Log4net create a file (App.log). In the virtual FP, it works.
    It creates the file /INTERNAL/App.log.

    But in the real FP, not works.

    thanks.
    Marcos Foglino

  • RussD
    Options
    You can create a temporary file on the FP, it will be destroyed the next time the FP restarts.
    Russell Drown
  • carlosmtz2000
    Options

    Hi Marcos,

    Is this a shareware that I can download it and try. Just to check if the problem is in the Fp, or the application is not compatilble with the Operatyng System

    BR.Carlos

    Carlos Martinez
    ABB