OpenTTD Source: src/os/unix/unix.cpp File Reference

OpenTTD Source 15.3

Functions
unix.cpp File Reference

Implementation of Unix specific file handling. More...

`#include "../../stdafx.h"`
`#include "../../textbuf_gui.h"`
`#include "../../debug.h"`
`#include "../../string_func.h"`
`#include "../../fios.h"`
`#include "../../thread.h"`
`#include <dirent.h>`
`#include <unistd.h>`
`#include <sys/stat.h>`
`#include <time.h>`
`#include <signal.h>`
`#include <pthread.h>`
`#include <SDL.h>`
`#include "../../safeguards.h"`

Go to the source code of this file.

## Functions
bool | FiosIsRoot (const std::string &path)
void | FiosGetDrives (FileList &)
std::optional< uint64_t > | FiosGetDiskFreeSpace (const std::string &path)
bool | FiosIsHiddenFile (const std::filesystem::path &path)
void | ShowInfoI (std::string_view str)
void | ShowOSErrorBox (std::string_view buf, bool)
std::optional< std::string > | GetClipboardContents ()
| Try to retrieve the current clipboard contents.
void | OSOpenBrowser (const std::string &url)
void | SetCurrentThreadName (const std::string &thread_name)
| Name the thread this function is called on for the debugger.

## Detailed Description

Implementation of Unix specific file handling.

Definition in file unix.cpp.

## Function Documentation

## ◆ FiosGetDiskFreeSpace()

std::optional< uint64_t > FiosGetDiskFreeSpace | ( | const std::string & | path | ) |

Definition at line 70 of file unix.cpp.

## ◆ FiosGetDrives()

void FiosGetDrives | ( | FileList & | file_list | ) |

Definition at line 65 of file unix.cpp.

## ◆ FiosIsHiddenFile()

bool FiosIsHiddenFile | ( | const std::filesystem::path & | path | ) |

Definition at line 84 of file unix.cpp.

## ◆ FiosIsRoot()

bool FiosIsRoot | ( | const std::string & | path | ) |

Definition at line 60 of file unix.cpp.

## ◆ GetClipboardContents()

std::optional< std::string > GetClipboardContents | ( |  | ) |

Try to retrieve the current clipboard contents.

Note
  OS-specific function.

Returns
  The (optional) clipboard contents.

Definition at line 205 of file unix.cpp.

Referenced by Textbuf::InsertClipboard().

## ◆ OSOpenBrowser()

void OSOpenBrowser | ( | const std::string & | url | ) |

Definition at line 230 of file unix.cpp.

## ◆ SetCurrentThreadName()

void SetCurrentThreadName | ( | const std::string & | name | ) |

Name the thread this function is called on for the debugger.

Parameters

  name | Name to set for the thread..

Definition at line 245 of file unix.cpp.

## ◆ ShowInfoI()

void ShowInfoI | ( | std::string_view | str | ) |

Definition at line 187 of file unix.cpp.

## ◆ ShowOSErrorBox()

void ShowOSErrorBox | ( | std::string_view | buf,
|  | bool | system
| ) |  |

Definition at line 193 of file unix.cpp.