![]() |
Autonomy Software C++ 24.5.1
Welcome to the Autonomy Software repository of the Mars Rover Design Team (MRDT) at Missouri University of Science and Technology (Missouri S&T)! API reference contains the source code and other resources for the development of the autonomy software for our Mars rover. The Autonomy Software project aims to compete in the University Rover Challenge (URC) by demonstrating advanced autonomous capabilities and robust navigation algorithms.
|

Public Member Functions | |
| virtual DUCKDB_API unique_ptr< FileHandle > | OpenFile (const string &path, FileOpenFlags flags, optional_ptr< FileOpener > opener=nullptr) |
| DUCKDB_API unique_ptr< FileHandle > | OpenFile (const OpenFileInfo &path, FileOpenFlags flags, optional_ptr< FileOpener > opener=nullptr) |
| virtual DUCKDB_API void | Read (FileHandle &handle, void *buffer, int64_t nr_bytes, idx_t location) |
| virtual DUCKDB_API void | Write (FileHandle &handle, void *buffer, int64_t nr_bytes, idx_t location) |
| virtual DUCKDB_API int64_t | Read (FileHandle &handle, void *buffer, int64_t nr_bytes) |
| virtual DUCKDB_API int64_t | Write (FileHandle &handle, void *buffer, int64_t nr_bytes) |
| Write nr_bytes from the buffer into the file, moving the file pointer forward by nr_bytes. | |
| virtual DUCKDB_API bool | Trim (FileHandle &handle, idx_t offset_bytes, idx_t length_bytes) |
| virtual DUCKDB_API int64_t | GetFileSize (FileHandle &handle) |
| Returns the file size of a file handle, returns -1 on error. | |
| virtual DUCKDB_API timestamp_t | GetLastModifiedTime (FileHandle &handle) |
| Returns the file last modified time of a file handle, returns timespec with zero on all attributes on error. | |
| virtual DUCKDB_API string | GetVersionTag (FileHandle &handle) |
| virtual DUCKDB_API FileType | GetFileType (FileHandle &handle) |
| Returns the file type of the attached handle. | |
| virtual DUCKDB_API FileMetadata | Stats (FileHandle &handle) |
| Returns the file stats of the attached handle. | |
| virtual DUCKDB_API void | Truncate (FileHandle &handle, int64_t new_size) |
| virtual DUCKDB_API bool | DirectoryExists (const string &directory, optional_ptr< FileOpener > opener=nullptr) |
| Check if a directory exists. | |
| virtual DUCKDB_API void | CreateDirectory (const string &directory, optional_ptr< FileOpener > opener=nullptr) |
| Create a directory if it does not exist. | |
| virtual DUCKDB_API void | CreateDirectoriesRecursive (const string &path, optional_ptr< FileOpener > opener=nullptr) |
| Helper function that uses DirectoryExists and CreateDirectory to ensure all directories in path are created. | |
| virtual DUCKDB_API void | RemoveDirectory (const string &directory, optional_ptr< FileOpener > opener=nullptr) |
| Recursively remove a directory and all files in it. | |
| virtual DUCKDB_API bool | ListFiles (const string &directory, const std::function< void(const string &, bool)> &callback, FileOpener *opener=nullptr) |
| List files in a directory, invoking the callback method for each one with (filename, is_dir) | |
| DUCKDB_API bool | ListFiles (const string &directory, const std::function< void(OpenFileInfo &info)> &callback, optional_ptr< FileOpener > opener=nullptr) |
| virtual DUCKDB_API void | MoveFile (const string &source, const string &target, optional_ptr< FileOpener > opener=nullptr) |
| virtual DUCKDB_API bool | FileExists (const string &filename, optional_ptr< FileOpener > opener=nullptr) |
| Check if a file exists. | |
| virtual DUCKDB_API bool | IsPipe (const string &filename, optional_ptr< FileOpener > opener=nullptr) |
| Check if path is pipe. | |
| virtual DUCKDB_API void | RemoveFile (const string &filename, optional_ptr< FileOpener > opener=nullptr) |
| Remove a file from disk. | |
| virtual DUCKDB_API bool | TryRemoveFile (const string &filename, optional_ptr< FileOpener > opener=nullptr) |
| Remvoe a file from disk if it exists - if it does not exist, return false. | |
| virtual DUCKDB_API void | RemoveFiles (const vector< string > &filenames, optional_ptr< FileOpener > opener=nullptr) |
| Remove multiple files from disk - does not error if any file does not exist. | |
| virtual DUCKDB_API void | FileSync (FileHandle &handle) |
| Sync a file handle to disk. | |
| virtual DUCKDB_API string | GetHomeDirectory () |
| Gets the users home directory. | |
| virtual DUCKDB_API string | ExpandPath (const string &path) |
| Expands a given path, including e.g. expanding the home directory of the user. | |
| virtual DUCKDB_API string | PathSeparator (const string &path) |
| Path separator for path. | |
| virtual DUCKDB_API bool | IsPathAbsolute (const string &path) |
| Checks if path is is an absolute path. | |
| DUCKDB_API string | JoinPath (const string &a, const string &path) |
| Join two paths together. | |
| template<typename... ARGS> | |
| string | JoinPath (const string &a, const string &b, ARGS... args) |
| DUCKDB_API string | ConvertSeparators (const string &path) |
| Convert separators in a path to the local separators (e.g. convert "/" into \ on windows) | |
| DUCKDB_API string | ExtractBaseName (const string &path) |
| Extract the base name of a file (e.g. if the input is lib/example.dll the base name is 'example') | |
| DUCKDB_API string | ExtractExtension (const string &path) |
| Extract the extension of a file (e.g. if the input is lib/example.dll the extension is 'dll') | |
| DUCKDB_API string | ExtractName (const string &path) |
| Extract the name of a file (e.g if the input is lib/example.dll the name is 'example.dll') | |
| virtual DUCKDB_API vector< OpenFileInfo > | Glob (const string &path, FileOpener *opener=nullptr) |
| Runs a glob on the file system, returning a list of matching files. | |
| DUCKDB_API unique_ptr< MultiFileList > | Glob (const string &path, const FileGlobInput &input, optional_ptr< FileOpener > opener) |
| DUCKDB_API unique_ptr< MultiFileList > | GlobFileList (const string &path, const FileGlobInput &input=FileGlobOptions::DISALLOW_EMPTY) |
| DUCKDB_API vector< OpenFileInfo > | GlobFiles (const string &pattern, const FileGlobInput &input=FileGlobOptions::DISALLOW_EMPTY) |
| virtual DUCKDB_API void | RegisterSubSystem (unique_ptr< FileSystem > sub_fs) |
| registers a sub-file system to handle certain file name prefixes, e.g. http:// etc. | |
| virtual DUCKDB_API void | RegisterSubSystem (FileCompressionType compression_type, unique_ptr< FileSystem > fs) |
| virtual DUCKDB_API void | UnregisterSubSystem (const string &name) |
| Unregister a sub-filesystem by name. | |
| virtual DUCKDB_API unique_ptr< FileSystem > | ExtractSubSystem (const string &name) |
| virtual DUCKDB_API vector< string > | ListSubSystems () |
| List registered sub-filesystems, including builtin ones. | |
| virtual DUCKDB_API bool | CanHandleFile (const string &fpath) |
| Whether or not a sub-system can handle a specific file path. | |
| virtual DUCKDB_API void | Seek (FileHandle &handle, idx_t location) |
| Set the file pointer of a file handle to a specified location. Reads and writes will happen from this location. | |
| virtual DUCKDB_API void | Reset (FileHandle &handle) |
| Reset a file to the beginning (equivalent to Seek(handle, 0) for simple files) | |
| virtual DUCKDB_API idx_t | SeekPosition (FileHandle &handle) |
| virtual DUCKDB_API bool | IsManuallySet () |
| If FS was manually set by the user. | |
| virtual DUCKDB_API bool | CanSeek () |
| Whether or not we can seek into the file. | |
| virtual DUCKDB_API bool | OnDiskFile (FileHandle &handle) |
| virtual DUCKDB_API unique_ptr< FileHandle > | OpenCompressedFile (QueryContext context, unique_ptr< FileHandle > handle, bool write) |
| virtual DUCKDB_API std::string | GetName () const =0 |
| Return the name of the filesytem. Used for forming diagnosis messages. | |
| virtual DUCKDB_API void | SetDisabledFileSystems (const vector< string > &names) |
| virtual DUCKDB_API bool | SubSystemIsDisabled (const string &name) |
| virtual DUCKDB_API bool | IsDisabledForPath (const string &path) |
| Check if the filesystem that would handle this path is disabled. | |
| virtual DUCKDB_API string | CanonicalizePath (const string &path, optional_ptr< FileOpener > opener=nullptr) |
| Canonicalize a path. | |
| template<class TARGET > | |
| TARGET & | Cast () |
| template<class TARGET > | |
| const TARGET & | Cast () const |
Static Public Member Functions | |
| static DUCKDB_API FileSystem & | GetFileSystem (ClientContext &context) |
| static DUCKDB_API FileSystem & | GetFileSystem (DatabaseInstance &db) |
| static DUCKDB_API FileSystem & | Get (AttachedDatabase &db) |
| static DUCKDB_API void | SetWorkingDirectory (const string &path) |
| Sets the working directory. | |
| static DUCKDB_API string | GetWorkingDirectory () |
| Gets the working directory. | |
| static DUCKDB_API string | GetHomeDirectory (optional_ptr< FileOpener > opener) |
| Gets the users home directory. | |
| static DUCKDB_API string | ExpandPath (const string &path, optional_ptr< FileOpener > opener) |
| Expands a given path, including e.g. expanding the home directory of the user. | |
| static DUCKDB_API optional_idx | GetAvailableMemory () |
| Returns the system-available memory in bytes. Returns DConstants::INVALID_INDEX if the system function fails. | |
| static DUCKDB_API optional_idx | GetAvailableDiskSpace (const string &path) |
| Returns the space available on the disk. Returns DConstants::INVALID_INDEX if the information was not available. | |
| static DUCKDB_API string | GetEnvVariable (const string &name) |
| Returns the value of an environment variable - or the empty string if it is not set. | |
| static DUCKDB_API bool | HasGlob (const string &str) |
| Whether there is a glob in the string. | |
| static DUCKDB_API unique_ptr< FileSystem > | CreateLocal () |
| Create a LocalFileSystem. | |
| static DUCKDB_API bool | IsRemoteFile (const string &path) |
| Whether or not a file is remote or local, based only on file path. | |
| static DUCKDB_API bool | IsRemoteFile (const string &path, string &extension) |
| static DUCKDB_API bool | IsDirectory (const OpenFileInfo &info) |
Protected Member Functions | |
| virtual DUCKDB_API unique_ptr< FileHandle > | OpenFileExtended (const OpenFileInfo &path, FileOpenFlags flags, optional_ptr< FileOpener > opener) |
| virtual DUCKDB_API bool | SupportsOpenFileExtended () const |
| virtual DUCKDB_API bool | ListFilesExtended (const string &directory, const std::function< void(OpenFileInfo &info)> &callback, optional_ptr< FileOpener > opener) |
| virtual DUCKDB_API bool | SupportsListFilesExtended () const |
| virtual DUCKDB_API unique_ptr< MultiFileList > | GlobFilesExtended (const string &path, const FileGlobInput &input, optional_ptr< FileOpener > opener=nullptr) |
| virtual DUCKDB_API bool | SupportsGlobExtended () const |
|
virtual |
|
static |
|
virtual |
| unique_ptr< FileHandle > duckdb::FileSystem::OpenFile | ( | const OpenFileInfo & | path, |
| FileOpenFlags | flags, | ||
| optional_ptr< FileOpener > | opener = nullptr |
||
| ) |
|
virtual |
Read exactly nr_bytes from the specified location in the file. Fails if nr_bytes could not be read. This is equivalent to calling SetFilePointer(location) followed by calling Read().
Reimplemented in duckdb::LocalFileSystem.

|
virtual |
Write exactly nr_bytes to the specified location in the file. Fails if nr_bytes could not be written. This is equivalent to calling SetFilePointer(location) followed by calling Write().
Reimplemented in duckdb::LocalFileSystem.

|
virtual |
Read nr_bytes from the specified file into the buffer, moving the file pointer forward by nr_bytes. Returns the amount of bytes read.
Reimplemented in duckdb::CompressedFileSystem, and duckdb::LocalFileSystem.

|
virtual |
Write nr_bytes from the buffer into the file, moving the file pointer forward by nr_bytes.
Reimplemented in duckdb::CompressedFileSystem, and duckdb::LocalFileSystem.

|
virtual |
Excise a range of the file. The OS can drop pages from the page-cache, and the file-system is free to deallocate this range (sparse file support). Reads to the range will succeed but will return undefined data.
Reimplemented in duckdb::LocalFileSystem.
|
virtual |
Returns the file size of a file handle, returns -1 on error.
Reimplemented in duckdb::CompressedFileSystem, and duckdb::LocalFileSystem.

|
virtual |
Returns the file last modified time of a file handle, returns timespec with zero on all attributes on error.
Reimplemented in duckdb::LocalFileSystem.

|
virtual |
Returns a tag that uniquely identifies the version of the file, used for checking cache invalidation for CachingFileSystem httpfs files
Reimplemented in duckdb::LocalFileSystem.
|
virtual |
Returns the file type of the attached handle.
Reimplemented in duckdb::LocalFileSystem.
|
virtual |
Returns the file stats of the attached handle.
Reimplemented in duckdb::LocalFileSystem.

|
virtual |
Truncate a file to a maximum size of new_size, new_size should be smaller than or equal to the current size of the file
Reimplemented in duckdb::LocalFileSystem.

|
virtual |
Check if a directory exists.
Reimplemented in duckdb::LocalFileSystem.


|
virtual |
Create a directory if it does not exist.
Reimplemented in duckdb::LocalFileSystem.


|
virtual |
Helper function that uses DirectoryExists and CreateDirectory to ensure all directories in path are created.

|
virtual |
Recursively remove a directory and all files in it.
Reimplemented in duckdb::LocalFileSystem.

|
virtual |
List files in a directory, invoking the callback method for each one with (filename, is_dir)

| bool duckdb::FileSystem::ListFiles | ( | const string & | directory, |
| const std::function< void(OpenFileInfo &info)> & | callback, | ||
| optional_ptr< FileOpener > | opener = nullptr |
||
| ) |
|
virtual |
Move a file from source path to the target, StorageManager relies on this being an atomic action for ACID properties
Reimplemented in duckdb::LocalFileSystem.

|
virtual |
Check if a file exists.
Reimplemented in duckdb::LocalFileSystem.


|
virtual |
|
virtual |
Remove a file from disk.
Reimplemented in duckdb::LocalFileSystem.


|
virtual |
Remvoe a file from disk if it exists - if it does not exist, return false.


|
virtual |
Remove multiple files from disk - does not error if any file does not exist.

|
virtual |
Sync a file handle to disk.
Reimplemented in duckdb::LocalFileSystem.

Sets the working directory.
|
static |
Gets the working directory.

|
static |
Gets the users home directory.

|
virtual |
Gets the users home directory.


|
static |
Expands a given path, including e.g. expanding the home directory of the user.


|
virtual |
Expands a given path, including e.g. expanding the home directory of the user.

|
static |
Returns the system-available memory in bytes. Returns DConstants::INVALID_INDEX if the system function fails.
|
static |
Returns the space available on the disk. Returns DConstants::INVALID_INDEX if the information was not available.
|
virtual |
Path separator for path.

|
virtual |
Checks if path is is an absolute path.
Reimplemented in duckdb::LocalFileSystem.


Join two paths together.


|
inline |
| string duckdb::FileSystem::ConvertSeparators | ( | const string & | path | ) |
Convert separators in a path to the local separators (e.g. convert "/" into \ on windows)


| string duckdb::FileSystem::ExtractBaseName | ( | const string & | path | ) |
Extract the base name of a file (e.g. if the input is lib/example.dll the base name is 'example')

| string duckdb::FileSystem::ExtractExtension | ( | const string & | path | ) |
Extract the extension of a file (e.g. if the input is lib/example.dll the extension is 'dll')

| string duckdb::FileSystem::ExtractName | ( | const string & | path | ) |
Extract the name of a file (e.g if the input is lib/example.dll the name is 'example.dll')


|
static |
Returns the value of an environment variable - or the empty string if it is not set.

|
static |
Whether there is a glob in the string.
|
virtual |
Runs a glob on the file system, returning a list of matching files.

| unique_ptr< MultiFileList > duckdb::FileSystem::Glob | ( | const string & | path, |
| const FileGlobInput & | input, | ||
| optional_ptr< FileOpener > | opener | ||
| ) |
| unique_ptr< MultiFileList > duckdb::FileSystem::GlobFileList | ( | const string & | path, |
| const FileGlobInput & | input = FileGlobOptions::DISALLOW_EMPTY |
||
| ) |
| vector< OpenFileInfo > duckdb::FileSystem::GlobFiles | ( | const string & | pattern, |
| const FileGlobInput & | input = FileGlobOptions::DISALLOW_EMPTY |
||
| ) |
|
virtual |
|
virtual |
Unregister a sub-filesystem by name.

|
virtual |
|
virtual |
List registered sub-filesystems, including builtin ones.

|
virtual |
Whether or not a sub-system can handle a specific file path.
Reimplemented in duckdb::LocalFileSystem.

|
virtual |
Set the file pointer of a file handle to a specified location. Reads and writes will happen from this location.
Reimplemented in duckdb::LocalFileSystem.

|
virtual |
Reset a file to the beginning (equivalent to Seek(handle, 0) for simple files)
Reimplemented in duckdb::CompressedFileSystem.
|
virtual |
Reimplemented in duckdb::LocalFileSystem.
|
virtual |
If FS was manually set by the user.
|
virtual |
Whether or not we can seek into the file.
Reimplemented in duckdb::CompressedFileSystem, and duckdb::LocalFileSystem.

|
virtual |
Whether or not the FS handles plain files on disk. This is relevant for certain optimizations, as random reads in a file on-disk are much cheaper than e.g. random reads in a file over the network
Reimplemented in duckdb::CompressedFileSystem, and duckdb::LocalFileSystem.

|
virtual |
|
static |
Create a LocalFileSystem.
|
pure virtual |
Return the name of the filesytem. Used for forming diagnosis messages.
Implemented in duckdb::GZipFileSystem, and duckdb::LocalFileSystem.

|
static |
Whether or not a file is remote or local, based only on file path.


|
static |
|
virtual |
|
virtual |
Check if the filesystem that would handle this path is disabled.

|
static |
|
virtual |
Canonicalize a path.
Reimplemented in duckdb::LocalFileSystem.


|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |