|
[Sponsors] |
October 12, 2011, 10:04 |
how to check the existence of a file
|
#1 |
New Member
tang jian hua
Join Date: May 2011
Posts: 2
Rep Power: 0 |
dear guys:
i recently write a udf,in order to check the existence of one file,i used the access function,(if (access(filename,0)==0).it works in vs-2005,but when i compile it in fluent,the error occur and it can't be compiled,any hints may help,thanks! |
|
October 13, 2011, 04:39 |
|
#2 |
Senior Member
Max
Join Date: Mar 2009
Posts: 133
Rep Power: 17 |
File *output_file;
if (!(output_file = fopen(filename,"r"))) Error("unable to open file"); checks wether a file "filename" can be opened or not. cheers |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
wmake compiling new solver | mksca | OpenFOAM Programming & Development | 14 | June 22, 2018 07:29 |
[swak4Foam] swak4foam building problem | GGerber | OpenFOAM Community Contributions | 54 | April 24, 2015 17:02 |
pisoFoam compiling error with OF 1.7.1 on MAC OSX | Greg Givogue | OpenFOAM Programming & Development | 3 | March 4, 2011 18:18 |
critical error during installation of openfoam | Fabio88 | OpenFOAM Installation | 21 | June 2, 2010 04:01 |
ParaView Compilation | jakaranda | OpenFOAM Installation | 3 | October 27, 2008 12:46 |