Skip to content
Snippets Groups Projects
Select Git revision
  • 427de34d56536a6c7588383b862743eb16df200f
  • master default protected
  • overlaps_tags_and_distributed_export
  • overlaps_tags_and_distributed_export_rebased
  • relaying
  • alphashapes
  • patches-4.14
  • steplayer
  • bl
  • pluginMeshQuality
  • fixBugsAmaury
  • hierarchical-basis
  • new_export_boris
  • oras_vs_osm
  • reassign_partitions
  • distributed_fwi
  • rename-classes
  • fix/fortran-api-example-t4
  • robust_partitions
  • reducing_files
  • fix_overlaps
  • gmsh_4_14_0
  • gmsh_4_13_1
  • gmsh_4_13_0
  • gmsh_4_12_2
  • gmsh_4_12_1
  • gmsh_4_12_0
  • gmsh_4_11_1
  • gmsh_4_11_0
  • gmsh_4_10_5
  • gmsh_4_10_4
  • gmsh_4_10_3
  • gmsh_4_10_2
  • gmsh_4_10_1
  • gmsh_4_10_0
  • gmsh_4_9_5
  • gmsh_4_9_4
  • gmsh_4_9_3
  • gmsh_4_9_2
  • gmsh_4_9_1
  • gmsh_4_9_0
41 results

OS.h

Blame
  • OS.h 1.20 KiB
    // Gmsh - Copyright (C) 1997-2019 C. Geuzaine, J.-F. Remacle
    //
    // See the LICENSE.txt file for license information. Please report all
    // issues on https://gitlab.onelab.info/gmsh/gmsh/issues.
    
    #ifndef OS_H
    #define OS_H
    
    #include <string>
    #include <stdio.h>
    
    FILE *Fopen(const char *f, const char *mode);
    const char *GetEnvironmentVar(const char *var);
    void SetEnvironmentVar(const char *var, const char *val);
    void SleepInSeconds(double s);
    void CheckResources();
    double Cpu();
    double TotalRam();
    double TimeOfDay();
    long GetMemoryUsage();
    int GetProcessId();
    std::string GetExecutableFileName();
    std::string GetAbsolutePath(const std::string &fileName);
    std::string GetHostName();
    int UnlinkFile(const std::string &fileName);
    int StatFile(const std::string &fileName);
    int KillProcess(int pid);
    int CreateSingleDir(const std::string &dirName);
    void CreatePath(const std::string &fullPath);
    int SystemCall(const std::string &command, bool blocking = false);
    int SystemCallExe(const std::string &exe, const std::string &argsOrCommand,
                      bool blocking = false);
    std::string GetCurrentWorkdir();
    void RedirectIOToConsole();
    void UnzipFile(const std::string &fileName, const std::string &prependDir = "");
    
    #endif