FasTensor  1.0.0
Transform Supercomputing for AI
Functions
ft_utility.cpp File Reference
#include "ft_utility.h"
#include <limits.h>

Functions

std::string realpathEx (std::string path)
 expand the path to full directory https://www.dreamincode.net/forums/topic/218601-realpath-and-tilde/ More...
 
int ExtractEndpointTypeInfo (std::string endpoint_type_info, AuEndpointType &endpoint_type, std::string &endpoint_info)
 Split endpoint_type_info string to type and information. More...
 
int file_exist (const char *filename)
 Check wether the file exists. More...
 
std::string ExtractFileName (const std::string &fullPath)
 
std::string ExtractPath (const std::string &fullPath)
 
std::vector< std::string > GetDirFileList (std::string dir_str_p)
 Get file list of a direction. More...
 
AuEndpointType MapString2EndpointType (std::string endpoint_type_str)
 map string typed name of type to AuEndpointType More...
 

Function Documentation

◆ ExtractEndpointTypeInfo()

int ExtractEndpointTypeInfo ( std::string  endpoint_type_info,
AuEndpointType endpoint_type,
std::string &  endpoint_info 
)

Split endpoint_type_info string to type and information.

Parameters
endpoint_type_info,informationstring for the endpoint
endpoint_type,outputvalue containing the type
endpoint_info,outputvalue containging all other parts
Returns
int

◆ ExtractFileName()

std::string ExtractFileName ( const std::string &  fullPath)
Parameters
fullPath
Returns
std::string

◆ ExtractPath()

std::string ExtractPath ( const std::string &  fullPath)
Parameters
fullPath
Returns
std::string

◆ file_exist()

int file_exist ( const char *  filename)

Check wether the file exists.

Parameters
filename
Returns
int

◆ GetDirFileList()

std::vector<std::string> GetDirFileList ( std::string  dir_str_p)

Get file list of a direction.

Parameters
dir_str_p
Returns
std::vector<std::string>

◆ MapString2EndpointType()

AuEndpointType MapString2EndpointType ( std::string  endpoint_type_str)

map string typed name of type to AuEndpointType

Parameters
endpoint_type_strinput of string name
Returns
AuEndpointType output of type

Author: Bin Dong dbin@.nosp@m.lbl..nosp@m.gov Web: https://crd.lbl.gov/bin-dong Scientific Data Management Research Group Lawrence Berkeley National Laboratory

◆ realpathEx()

std::string realpathEx ( std::string  path)

expand the path to full directory https://www.dreamincode.net/forums/topic/218601-realpath-and-tilde/

Author: Bin Dong dbin@.nosp@m.lbl..nosp@m.gov Web: https://crd.lbl.gov/bin-dong Scientific Data Management Research Group Lawrence Berkeley National Laboratory