WPILibC++ 2023.4.3-108-ge5452e3
Filesystem.h
Go to the documentation of this file.
1// Copyright (c) FIRST and other WPILib contributors.
2// Open Source Software; you can modify and/or share it under the terms of
3// the WPILib BSD license file in the root directory of this project.
4
5#pragma once
6
7#include <string>
8
9/** WPILib FileSystem namespace */
10namespace frc::filesystem {
11
12/**
13 * Obtains the current working path that the program was launched with.
14 * This is analogous to the `pwd` command on unix.
15 *
16 * @return The result of the current working path lookup.
17 */
18std::string GetLaunchDirectory();
19
20/**
21 * Obtains the operating directory of the program. On the roboRIO, this
22 * is /home/lvuser. In simulation, it is where the simulation was launched
23 * from (`pwd`).
24 *
25 * @return The result of the operating directory lookup.
26 */
28
29/**
30 * Obtains the deploy directory of the program, which is the remote location
31 * src/main/deploy is deployed to by default. On the roboRIO, this is
32 * /home/lvuser/deploy. In simulation, it is where the simulation was launched
33 * from, in the subdirectory "src/main/deploy" (`pwd`/src/main/deploy).
34 *
35 * @return The result of the operating directory lookup
36 */
37std::string GetDeployDirectory();
38
39} // namespace frc::filesystem
WPILib FileSystem namespace.
Definition: Filesystem.h:10
std::string GetDeployDirectory()
Obtains the deploy directory of the program, which is the remote location src/main/deploy is deployed...
std::string GetOperatingDirectory()
Obtains the operating directory of the program.
std::string GetLaunchDirectory()
Obtains the current working path that the program was launched with.