Functions

acsutilFindFile.h File Reference

Go to the source code of this file.

Functions

int acsFindFile (const char *fileName, char *filePath, char *mode, int *size, char *dirFlag)
int ccsFileExist (char *filePath)

Detailed Description

Header file for ACS file utility functions.


Function Documentation

int acsFindFile ( const char *  fileName,
char *  filePath,
char *  mode,
int *  size,
char *  dirFlag 
)

acsFindFile is a function which is quite literally used to find a file in the ALMA Software Engineering prescribed file heirachy. You should provide the name of the file you're looking for (e.g., "lib/python/site-packages/myFile.py") and also pointers to memory addresses where the results of this function will be stored. The only other thing to mention is the file must be in INTROOT, INTLIST, or ACSROOT.

Parameters:
fileName Name of the file you are searching for.
filePath An empty pointer where this function will store the full path name of the file you are searching for. If this is not found, this pointer is set to "".
mode An empty pointer where the mode of the file you are searching for (file permissions) is stored.
size An empty pointer where the size of the file you are searching for in bytes is stored.
dirFlag An empty pointer where if this is a directory, the value is set to 1. 0 otherwise.
Returns:
0 on an error condition and 1 otherwise.

NOTES:

  • should have a boolean return value
  • dirFlag should be a boolean
  • shouldn't size be a long or larger!?!
int ccsFileExist ( char *  filePath  ) 

Function which checks to see if a file exists.

Parameters:
filePath Full file path name of the file we're looking for.
Returns:
1 if the file exists and 0 otherwise.

NOTES:

  • return value should be boolean
  • why is this called "ccs"FileExist?