filestat()

Returns a binary number that represents the status of a file. It is interpreted in the same way that UNIX interprets the permission bits for a file.

Syntax:

filestat(filepath);

where

filepath is a string that represents the file to check OR a file pointer that points to a file (obtained via fopen() ).

The returned binary numbers can be interpreted as:

01 = Execute permission to others
02 = Write permission to others
04 = Read permission to others
010 = Execute permission to group
020 = Write permission to group
040 = Read permission to group
0100 = Execute permission to owner
0200 = Write permission to owner
0400 = Read permission to owner

Example:
decl stat;
stat = filestat("myAELfile.ael");
if (stat & 0200)
{
      // writable by owner
}
if ((stat & 0400) &&
    (stat & 040) &&
    (stat & 04))
{
      // readable by all
}

Where Used:

Measurement Expressions (Data Display equations and Schematic MeasEqns), Schematic, Layout, Simulation, GUI

 

Privacy Statement  | Terms of Use  | Legal | Contact Us  | © Agilent 2000-2008 

Contents
Additional Resources