Welcome to mirror list, hosted at ThFree Co, Russian Federation.

file_exists.cpp « igl « src « xs - github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: f1a30630bd7d1f93aa5d7548214323931f7d2bb8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// This file is part of libigl, a simple c++ geometry processing library.
// 
// Copyright (C) 2013 Alec Jacobson <alecjacobson@gmail.com>
// 
// This Source Code Form is subject to the terms of the Mozilla Public License 
// v. 2.0. If a copy of the MPL was not distributed with this file, You can 
// obtain one at http://mozilla.org/MPL/2.0/.
#include "file_exists.h"

#include <sys/stat.h>

IGL_INLINE bool igl::file_exists(const std::string filename)
{
  struct stat status;
  return (stat(filename.c_str(),&status)==0);
}