Open3D (C++ API)  0.18.0+252c867
Data Structures | Functions
open3d::utility::filesystem Namespace Reference

Data Structures

class  CFile
 

Functions

std::string GetHomeDirectory ()
 Get the HOME directory for the user. More...
 
std::string GetFileExtensionInLowerCase (const std::string &filename)
 
std::string GetFileNameWithoutExtension (const std::string &filename)
 
std::string GetFileNameWithoutDirectory (const std::string &filename)
 
std::string GetFileParentDirectory (const std::string &filename)
 
std::string GetRegularizedDirectoryName (const std::string &directory)
 
std::string GetWorkingDirectory ()
 
std::vector< std::string > GetPathComponents (const std::string &path)
 
std::string GetTempDirectoryPath ()
 
bool ChangeWorkingDirectory (const std::string &directory)
 
bool DirectoryExists (const std::string &directory)
 
bool DirectoryIsEmpty (const std::string &directory)
 
bool MakeDirectory (const std::string &directory)
 
bool MakeDirectoryHierarchy (const std::string &directory)
 
bool DeleteDirectory (const std::string &directory)
 
bool FileExists (const std::string &filename)
 
bool Copy (const std::string &src_path, const std::string &dst_path)
 
bool RemoveFile (const std::string &filename)
 
bool ListDirectory (const std::string &directory, std::vector< std::string > &subdirs, std::vector< std::string > &filenames)
 
bool ListFilesInDirectory (const std::string &directory, std::vector< std::string > &filenames)
 
bool ListFilesInDirectoryWithExtension (const std::string &directory, const std::string &extname, std::vector< std::string > &filenames)
 
std::vector< std::string > FindFilesRecursively (const std::string &directory, std::function< bool(const std::string &)> is_match)
 
FILE * FOpen (const std::string &filename, const std::string &mode)
 
std::string GetIOErrorString (const int errnoVal)
 
bool FReadToBuffer (const std::string &path, std::vector< char > &bytes, std::string *errorStr)
 
std::string JoinPath (const std::string &path_component1, const std::string &path_component2)
 
std::string JoinPath (const std::vector< std::string > &path_components)
 
std::string AddIfExist (const std::string &path, const std::vector< std::string > &folder_names)
 

Function Documentation

◆ AddIfExist()

std::string open3d::utility::filesystem::AddIfExist ( const std::string &  path,
const std::vector< std::string > &  folder_names 
)

◆ ChangeWorkingDirectory()

bool open3d::utility::filesystem::ChangeWorkingDirectory ( const std::string &  directory)

◆ Copy()

bool open3d::utility::filesystem::Copy ( const std::string &  src_path,
const std::string &  dst_path 
)

◆ DeleteDirectory()

bool open3d::utility::filesystem::DeleteDirectory ( const std::string &  directory)

◆ DirectoryExists()

bool open3d::utility::filesystem::DirectoryExists ( const std::string &  directory)

◆ DirectoryIsEmpty()

bool open3d::utility::filesystem::DirectoryIsEmpty ( const std::string &  directory)

◆ FileExists()

bool open3d::utility::filesystem::FileExists ( const std::string &  filename)

◆ FindFilesRecursively()

std::vector< std::string > open3d::utility::filesystem::FindFilesRecursively ( const std::string &  directory,
std::function< bool(const std::string &)>  is_match 
)

◆ FOpen()

FILE * open3d::utility::filesystem::FOpen ( const std::string &  filename,
const std::string &  mode 
)

◆ FReadToBuffer()

bool open3d::utility::filesystem::FReadToBuffer ( const std::string &  path,
std::vector< char > &  bytes,
std::string *  errorStr 
)

◆ GetFileExtensionInLowerCase()

std::string open3d::utility::filesystem::GetFileExtensionInLowerCase ( const std::string &  filename)

◆ GetFileNameWithoutDirectory()

std::string open3d::utility::filesystem::GetFileNameWithoutDirectory ( const std::string &  filename)

◆ GetFileNameWithoutExtension()

std::string open3d::utility::filesystem::GetFileNameWithoutExtension ( const std::string &  filename)

◆ GetFileParentDirectory()

std::string open3d::utility::filesystem::GetFileParentDirectory ( const std::string &  filename)

◆ GetHomeDirectory()

std::string open3d::utility::filesystem::GetHomeDirectory ( )

Get the HOME directory for the user.

The home directory is determined in the following order:

  • On Unix:
    • $HOME
    • /
  • On Windows:
    • USERPROFILE%
    • HOMEDRIVE%
    • HOMEPATH%
    • HOME%
    • C:/

This is the same logics as used in Qt.

  • src/corelib/io/qfilesystemengine_win.cpp
  • src/corelib/io/qfilesystemengine_unix.cpp

◆ GetIOErrorString()

std::string open3d::utility::filesystem::GetIOErrorString ( const int  errnoVal)

◆ GetPathComponents()

std::vector< std::string > open3d::utility::filesystem::GetPathComponents ( const std::string &  path)

◆ GetRegularizedDirectoryName()

std::string open3d::utility::filesystem::GetRegularizedDirectoryName ( const std::string &  directory)

◆ GetTempDirectoryPath()

std::string open3d::utility::filesystem::GetTempDirectoryPath ( )

◆ GetWorkingDirectory()

std::string open3d::utility::filesystem::GetWorkingDirectory ( )

◆ JoinPath() [1/2]

std::string open3d::utility::filesystem::JoinPath ( const std::string &  path_component1,
const std::string &  path_component2 
)

◆ JoinPath() [2/2]

std::string open3d::utility::filesystem::JoinPath ( const std::vector< std::string > &  path_components)

◆ ListDirectory()

bool open3d::utility::filesystem::ListDirectory ( const std::string &  directory,
std::vector< std::string > &  subdirs,
std::vector< std::string > &  filenames 
)

◆ ListFilesInDirectory()

bool open3d::utility::filesystem::ListFilesInDirectory ( const std::string &  directory,
std::vector< std::string > &  filenames 
)

◆ ListFilesInDirectoryWithExtension()

bool open3d::utility::filesystem::ListFilesInDirectoryWithExtension ( const std::string &  directory,
const std::string &  extname,
std::vector< std::string > &  filenames 
)

◆ MakeDirectory()

bool open3d::utility::filesystem::MakeDirectory ( const std::string &  directory)

◆ MakeDirectoryHierarchy()

bool open3d::utility::filesystem::MakeDirectoryHierarchy ( const std::string &  directory)

◆ RemoveFile()

bool open3d::utility::filesystem::RemoveFile ( const std::string &  filename)