Advertisement
ipsBruno

(C++) FileExists

Nov 25th, 2012
473
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.35 KB | None | 0 0
  1.  /*
  2.  *  Copyright (c) 2012 [iPs]TeaM
  3.  *  Bruno da Silva (email@brunodasilva.com)
  4.  *  Função FileExists em C++! Checar a existência de um arquivo
  5.  *
  6.  * www.brunodasilva.com
  7.  * www.ips-team.forumeiros.com
  8. */    
  9.  
  10.  
  11. #include <sys/stat.h>
  12.  
  13. bool FileExists(char * arquivo)
  14. {
  15.     struct stat statVar;
  16.     return (stat ( arquivo, &statVar ) == 0);      
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement