SINFONI Pipeline Reference Manual
2.5.2
sinfoni
sinfo_file_handling.c
1
/*
2
* This file is part of the ESO SINFONI Pipeline
3
* Copyright (C) 2004,2005 European Southern Observatory
4
*
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation; either version 2 of the License, or
8
* (at your option) any later version.
9
*
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
14
*
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA
18
*/
19
#ifdef HAVE_CONFIG_H
20
# include <config.h>
21
#endif
22
#include <stdio.h>
23
#include <string.h>
24
#include "sinfo_file_handling.h"
25
33
/*----------------------------------------------------------------------------
34
Function codes
35
---------------------------------------------------------------------------*/
36
37
38
/*-------------------------------------------------------------------------*/
49
/*--------------------------------------------------------------------------*/
50
51
52
int
sinfo_file_exists(
const
char
* filename)
53
{
54
int
exists=0;
55
FILE* fo=NULL;
56
if
((fo=fopen(filename,
"r"
))==NULL) {
57
exists=0;
58
}
else
{
59
exists=1;
60
}
61
62
if
(fo!=NULL) {
63
fclose(fo);
64
}
65
66
return
exists;
67
}
Generated by
1.8.1.1