OROCHI
 
Loading...
Searching...
No Matches
GxFilePath Class Reference

ファイルパス管理クラス More...

#include <GxFile.h>

Inheritance diagram for GxFilePath:
Collaboration diagram for GxFilePath:

Public Member Functions

アクセサ
GX_FORCE_INLINE const GxStringgetFullPath (void) const
 フルパス取得
 
GX_FORCE_INLINE const GxStringgetDirectoryPath (void) const
 ディレクトリパス取得
 
GX_FORCE_INLINE const GxStringgetFileName (void) const
 ファイル名取得 (拡張子含む)
 
GX_FORCE_INLINE const GxStringgetFileNameWithoutExtension (void) const
 ファイル名取得 (拡張子含まない)
 
GX_FORCE_INLINE const GxStringgetExtension (void) const
 拡張子取得
 
- Public Member Functions inherited from GxClassBase
constexpr GxClassBase (void)
 コンストラクタ
 
constexpr GxClassBase (const GxClassBase &base)
 コピーコンストラクタ
 
 ~GxClassBase (void) override
 デストラクタ
 
- Public Member Functions inherited from GxClassBaseRoot
constexpr GxClassBaseRoot (void)
 コンストラクタ
 
constexpr GxClassBaseRoot (const GxClassBaseRoot &)
 コピーコンストラクタ
 
virtual ~GxClassBaseRoot (void)
 デストラクタ
 
constexpr GxClassBaseRootoperator= (const GxClassBaseRoot &)
 代入演算子
 
virtual GxRttigetRtti (void) const =0
 Rttiの取得
 
virtual GX_FORCE_INLINE const GxTypedObjectgetDefaultObject (void)
 デフォルトオブジェクトを取得
 
GX_FORCE_INLINE b32 isDefaultObject (void)
 デフォルトオブジェクト判定
 

定義

static constexpr GX_CCHAR DEFAULT_SEPARATOR = '/'
 基本セパレータ
 
static constexpr GX_CCHAR REPLACE_SEPARATOR = '\\'
 置換対象セパレータ
 
static constexpr GX_CCHAR SYSTEM_SEPARATOR = '/'
 システムセパレータ
 
static constexpr GX_CCHAR SYSTEM_REPLACE = '\\'
 システム置換対象セパレータ
 

初期化

 GxFilePath (void)
 デフォルトコンストラクタ (使用禁止)
 
 GxFilePath (GX_CSTR path, GX_CCHAR separator=DEFAULT_SEPARATOR, b32 isAbsolutePath=false)
 コンストラクタ
 

操作

void addDirectoryPath (GX_CSTR folderName)
 ディレクトリパス追加
 
void reduceDirectoryPath (void)
 ディレクトリを1階層上にする
 
static GX_FORCE_INLINE b32 isSeparator (GX_CCHAR character)
 セパレータ判定
 
static GX_FORCE_INLINE b32 isPeriod (GX_CCHAR character)
 ピリオド判定
 
static GX_FORCE_INLINE b32 isNetworkPath (GX_CSTR path)
 ネットワークパス判定
 
static GX_FORCE_INLINE b32 isMoveUpDirectoryPath (GX_CSTR path)
 1階層上ディレクトリ移動パス判定
 
static b32 isRootPath (GX_CSTR path)
 ルートパス判定
 
static b32 isDirectoryPath (GX_CSTR path, GX_CCHAR separator=DEFAULT_SEPARATOR)
 ディレクトリパス判定
 
static b32 isRelativePath (GX_CSTR path)
 相対パス判定
 
static b32 convertSeparator (GX_STR path, GX_CCHAR separator=DEFAULT_SEPARATOR)
 セパレータの変換
 
static void normalize (GxString &path, GX_CCHAR separator=DEFAULT_SEPARATOR)
 パスの正常化
 
static b32 extractFileName (GxString &dst, GX_CSTR path, GX_CCHAR separator=DEFAULT_SEPARATOR)
 ファイル名抽出
 
static b32 extractFileNameWithoutExtension (GxString &dst, GX_CSTR path, GX_CCHAR separator=DEFAULT_SEPARATOR)
 ファイル名抽出 (拡張子を含まない)
 
static b32 extractExtension (GxString &dst, GX_CSTR path, GX_CCHAR separator=DEFAULT_SEPARATOR)
 拡張子抽出
 
static b32 addExtension (GxString &dst, GX_CSTR path, GX_CSTR extension, GX_CCHAR separator=DEFAULT_SEPARATOR)
 拡張子追加
 
static b32 deleteExtension (GxString &dst, GX_CCHAR separator=DEFAULT_SEPARATOR)
 拡張子除去 (GxString入出力指定)
 
static b32 deleteExtension (GxString &dst, GX_CSTR path, GX_CCHAR separator=DEFAULT_SEPARATOR)
 拡張子除去 (文字列入力指定)
 
static b32 isExistExtension (GX_CSTR path, GX_CCHAR separator=DEFAULT_SEPARATOR)
 拡張子存在判定
 
static void addDirectoryPath (GxString &dst, const GxString &src, const GxString &directory, GX_CCHAR separator=DEFAULT_SEPARATOR)
 ディレクトリパス追加
 
static b32 getRelativePath (GxString &dst, GX_CSTR basePath, GX_CSTR targetPath, b32 isUseDirectorySupport=true)
 相対パス取得
 

Additional Inherited Members

- Static Public Member Functions inherited from GxClassBaseRoot
static GX_FORCE_INLINE GxRtti__getStaticRtti (void)
 Rttiの取得
 

Detailed Description

ファイルパス管理クラス

Constructor & Destructor Documentation

◆ GxFilePath()

GxFilePath::GxFilePath ( GX_CSTR path,
GX_CCHAR separator = DEFAULT_SEPARATOR,
b32 isAbsolutePath = false )

コンストラクタ

Parameters
path[in] 設定パス
separator[in] セパレータ文字
isAbsolutePath[in] 絶対パス変換フラグ (※PCの場合のみ有効。省略時 : false)

Member Function Documentation

◆ addDirectoryPath() [1/2]

void GxFilePath::addDirectoryPath ( GX_CSTR folderName)

ディレクトリパス追加

Parameters
folderName[in] フォルダ名

◆ addDirectoryPath() [2/2]

void GxFilePath::addDirectoryPath ( GxString & dst,
const GxString & src,
const GxString & directory,
GX_CCHAR separator = DEFAULT_SEPARATOR )
static

ディレクトリパス追加

Parameters
dst[out] ディレクトリ追加後パス格納先
src[in] 追加元パス
directory[in] 追加ディレクトリ名
separator[in] セパレータ文字
Here is the call graph for this function:

◆ addExtension()

b32 GxFilePath::addExtension ( GxString & dst,
GX_CSTR path,
GX_CSTR extension,
GX_CCHAR separator = DEFAULT_SEPARATOR )
static

拡張子追加

Parameters
dst[out] 追加後パス格納先
path[in] 追加元パス
extension[in] 追加拡張子文字列
separator[in] セパレータ文字
Returns
成功ならtrue
Here is the call graph for this function:

◆ convertSeparator()

b32 GxFilePath::convertSeparator ( GX_STR path,
GX_CCHAR separator = DEFAULT_SEPARATOR )
static

セパレータの変換

Parameters
path[in,out] 変換パス
separator[in] セパレータ文字
Returns
置換実行したらtrue

◆ deleteExtension() [1/2]

b32 GxFilePath::deleteExtension ( GxString & path,
GX_CCHAR separator = DEFAULT_SEPARATOR )
static

拡張子除去 (GxString入出力指定)

Parameters
path[in,out] 除去対象文字列パス
separator[in] セパレータ文字
Returns
成功ならtrue
Here is the call graph for this function:
Here is the caller graph for this function:

◆ deleteExtension() [2/2]

b32 GxFilePath::deleteExtension ( GxString & dst,
GX_CSTR path,
GX_CCHAR separator = DEFAULT_SEPARATOR )
static

拡張子除去 (文字列入力指定)

Parameters
dst[out] 除去後パス格納先
path[in] 除去元パス
separator[in] セパレータ文字
Returns
成功ならtrue
Here is the call graph for this function:

◆ extractExtension()

b32 GxFilePath::extractExtension ( GxString & dst,
GX_CSTR path,
GX_CCHAR separator = DEFAULT_SEPARATOR )
static

拡張子抽出

Parameters
dst[out] 抽出後ファイル名格納先
path[in] 抽出元パス
separator[in] セパレータ文字
Returns
成功ならtrue
Note
多重拡張子も1つの拡張子として認識します。
Here is the call graph for this function:
Here is the caller graph for this function:

◆ extractFileName()

b32 GxFilePath::extractFileName ( GxString & dst,
GX_CSTR path,
GX_CCHAR separator = DEFAULT_SEPARATOR )
static

ファイル名抽出

Parameters
dst[out] 抽出後ファイル名格納先
path[in] 抽出元パス
separator[in] セパレータ文字列
Returns
成功ならtrue
Here is the call graph for this function:
Here is the caller graph for this function:

◆ extractFileNameWithoutExtension()

b32 GxFilePath::extractFileNameWithoutExtension ( GxString & dst,
GX_CSTR path,
GX_CCHAR separator = DEFAULT_SEPARATOR )
static

ファイル名抽出 (拡張子を含まない)

Parameters
dst[out] 抽出後ファイル名格納先
path[in] 抽出元パス
separator[in] セパレータ文字
Returns
成功ならtrue
Here is the call graph for this function:

◆ getRelativePath()

b32 GxFilePath::getRelativePath ( GxString & dst,
GX_CSTR basePath,
GX_CSTR targetPath,
b32 isUseDirectorySupport = true )
static

相対パス取得

Parameters
dst[out] 相対パス格納先
basePath[in] 相対パス生成ベースパス
targetPath[in] 相対パス生成対象パス
isUseDirectorySupport[in] ディレクトリサポート使用フラグ (trueの場合:拡張子が無いものをディレクトリとして補助する)
Returns
成功ならtrue
Note
basePath をカレントとした targetPath への相対パスを生成します。
Here is the call graph for this function:

◆ isDirectoryPath()

b32 GxFilePath::isDirectoryPath ( GX_CSTR path,
GX_CCHAR separator = DEFAULT_SEPARATOR )
static

ディレクトリパス判定

Parameters
path[in] 判定元パス
separator[in] セパレータ文字
Returns
ディレクトリパスならtrue
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isExistExtension()

b32 GxFilePath::isExistExtension ( GX_CSTR path,
GX_CCHAR separator = DEFAULT_SEPARATOR )
static

拡張子存在判定

Parameters
path[in] 判定対象パス
separator[in] セパレータ文字
Returns
拡張子ありならtrue
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isRelativePath()

b32 GxFilePath::isRelativePath ( GX_CSTR path)
static

相対パス判定

Parameters
path[in] 判定元パス
Returns
相対パスならtrue
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isRootPath()

b32 GxFilePath::isRootPath ( GX_CSTR path)
static

ルートパス判定

Parameters
path[in] 判定元パス
Returns
ルートパスならtrue
Here is the call graph for this function:

◆ normalize()

void GxFilePath::normalize ( GxString & path,
GX_CCHAR separator = DEFAULT_SEPARATOR )
static

パスの正常化

Parameters
path[in,out] 正常化対象パス
separator[in] 使用セパレータ
Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following files: