RASCSI/src/raspberrypi/filepath.h

69 lines
1.7 KiB
C
Raw Normal View History

2018-05-03 13:47:57 +00:00
//---------------------------------------------------------------------------
//
// X68000 EMULATOR "XM6"
//
// Copyright (C) 2001-2006 (ytanaka@ipc-tokai.or.jp)
// Copyright (C) 2012-2020 GIMONS
2018-05-03 13:47:57 +00:00
// [ ファイルパス(サブセット) ]
//
//---------------------------------------------------------------------------
#if !defined(filepath_h)
#define filepath_h
class Fileio;
2018-05-03 13:47:57 +00:00
//---------------------------------------------------------------------------
//
// Constant definition
2018-05-03 13:47:57 +00:00
//
//---------------------------------------------------------------------------
#define FILEPATH_MAX _MAX_PATH
//===========================================================================
//
// ファイルパス
// ※代入演算子を用意すること
//
//===========================================================================
class Filepath
{
public:
Filepath();
// コンストラクタ
virtual ~Filepath();
// デストラクタ
Filepath& operator=(const Filepath& path);
// 代入
void Clear();
2018-05-03 13:47:57 +00:00
// クリア
void SetPath(LPCSTR path);
2018-05-03 13:47:57 +00:00
// ファイル設定(ユーザ) MBCS用
LPCTSTR GetPath() const { return m_szPath; }
2018-05-03 13:47:57 +00:00
// パス名取得
LPCTSTR GetFileExt() const;
2018-05-03 13:47:57 +00:00
// ショート名取得(LPCTSTR)
BOOL Save(Fileio *fio, int ver);
2018-05-03 13:47:57 +00:00
// セーブ
BOOL Load(Fileio *fio, int ver);
2018-05-03 13:47:57 +00:00
// ロード
private:
void Split();
2018-05-03 13:47:57 +00:00
// パス分割
TCHAR m_szPath[_MAX_PATH];
// ファイルパス
TCHAR m_szDir[_MAX_DIR];
// ディレクトリ
TCHAR m_szFile[_MAX_FNAME];
// ファイル
TCHAR m_szExt[_MAX_EXT];
// 拡張子
static TCHAR FileExt[_MAX_FNAME + _MAX_DIR];
// ショート名(TCHAR)
};
#endif // filepath_h