本文整理汇总了C++中GetFullPath函数的典型用法代码示例。如果您正苦于以下问题:C++ GetFullPath函数的具体用法?C++ GetFullPath怎么用?C++ GetFullPath使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetFullPath函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: WriteTagAPE
bool WriteTagAPE(FILE_INFO *pFileMP3)
{
CTag_Ape ape;
if (ape.Load(GetFullPath(pFileMP3)) != ERROR_SUCCESS) {
return false;
}
//ape.Release();
// トラック名
ape.SetComment(CTag_Ape::APE_TAG_FIELD_TITLE, GetTrackNameSI(pFileMP3));
// アーティスト名
ape.SetComment(CTag_Ape::APE_TAG_FIELD_ARTIST, GetArtistNameSI(pFileMP3));
// アルバム名
ape.SetComment(CTag_Ape::APE_TAG_FIELD_ALBUM, GetAlbumNameSI(pFileMP3));
// リリース年号
ape.SetComment(CTag_Ape::APE_TAG_FIELD_YEAR, GetYearSI(pFileMP3));
// コメント
ape.SetComment(CTag_Ape::APE_TAG_FIELD_COMMENT, GetCommentSI(pFileMP3));
// トラック番号
ape.SetComment(CTag_Ape::APE_TAG_FIELD_TRACK, GetTrackNumberSI(pFileMP3));
// ジャンル番号
ape.SetComment(CTag_Ape::APE_TAG_FIELD_GENRE, GetGenreSI(pFileMP3));
// 作曲者
ape.SetComment("Composer", GetComposerSI(pFileMP3));
// パフォーマー
ape.SetComment("Performer", GetOrigArtistSI(pFileMP3));
if (ape.Save(GetFullPath(pFileMP3)) != ERROR_SUCCESS) {
return false;
}
return true;
}
开发者ID:iskwa,项目名称:mm_STEP_M,代码行数:32,代码来源:STEP_ape.cpp
示例2: locker
void TextResource::InitialLoad()
{
/**
* Stuff to know about resource loading...
*
* Currently Sigil when opening an ePub creates Resource objects *prior*
* to actually copying the resources from the zip into the Sigil folders.
* So in 99% of cases the resource will not exist, so a call to InitialLoad()
* from the constructor would fail (which it used to do).
*
* For some resource types there is a call made afterwards which will result
* in the resource being loaded such as for HTML files, CSS, NCX and OPF
* (see UniversalUpdates.cpp and code setting default text for new html pages etc).
*
* For other text resource types, they will only get loaded on demand, when
* the tab is actually opened, TextTab.cpp will call this InitialLoad() function.
*
* If you were to write some code to iterate over resources that do not fall
* into the special cases above, you *must* call InitialLoad() first to ensure
* the data is loaded, or else it will be blank or have data depending on whether
* it had been opened in a tab first.
*/
QWriteLocker locker(&GetLock());
Q_ASSERT(m_TextDocument);
if (m_TextDocument->toPlainText().isEmpty() && QFile::exists(GetFullPath())) {
SetText(Utility::ReadUnicodeTextFile(GetFullPath()));
}
}
开发者ID:AmesianX,项目名称:Sigil,代码行数:29,代码来源:TextResource.cpp
示例3: VERIFY
/**
*
* Returns associated file icon.
*
* @param Nil
* @return HICON - Returns file icon
* @exception Nil
* @see Nil
* @since 1.0
*/
HICON Process::ExtractAssociatedProcessIcon()
{
// If there is already an icon return that
if( m_ahmProcessFileIcon.IsValid() )
{
return m_ahmProcessFileIcon;
}
// Check path
if( GetFullPath().IsEmpty() )
{
return 0;
}
SHFILEINFO shFileInfo = { 0 };
// For retrieving icon
VERIFY( SHGetFileInfo( GetFullPath(),
FILE_ATTRIBUTE_NORMAL,
&shFileInfo,
sizeof( shFileInfo ),
SHGFI_SMALLICON | SHGFI_ICON | SHGFI_USEFILEATTRIBUTES ));
// Do we have an icon, then store this icon handle
// for destruction later on
if( shFileInfo.hIcon )
{
m_ahmProcessFileIcon = shFileInfo.hIcon;
}
// Icon to return
return m_ahmProcessFileIcon;
}// End GetAssociatedProcessIcon
开发者ID:caidongyun,项目名称:libs,代码行数:43,代码来源:Process.cpp
示例4: GetFullPath
BOOL FileMisc::IsSameFile(const CString& sFilePath1, const CString& sFilePath2)
{
CString sFullPath1 = GetFullPath(sFilePath1);
CString sFullPath2 = GetFullPath(sFilePath2);
return (sFilePath1.CompareNoCase(sFullPath2) == 0);
}
开发者ID:noindom99,项目名称:repositorium,代码行数:7,代码来源:FileMisc.cpp
示例5: ifs
ae3d::FileSystem::FileContentsData ae3d::FileSystem::FileContents(const char* path)
{
ae3d::FileSystem::FileContentsData outData;
outData.path = path == nullptr ? "" : std::string(GetFullPath(path));
for (const auto& pakFile : Global::pakFiles)
{
for (const auto& entry : pakFile.entries)
{
if (entry.path == std::string(path))
{
outData.data = entry.contents;
outData.isLoaded = true;
return outData;
}
}
}
std::ifstream ifs(GetFullPath(path), std::ios::binary);
outData.data.assign(std::istreambuf_iterator< char >(ifs), std::istreambuf_iterator< char >());
outData.isLoaded = ifs.is_open();
if (!outData.isLoaded)
{
System::Print( "FileSystem: Could not open %s.\n", path );
}
return outData;
}
开发者ID:souxiaosou,项目名称:aether3d,代码行数:31,代码来源:FileSystem.cpp
示例6: int
~Log()
{
if (_messages.size() <= 1) {
return;
}
// Build the file name for storing this game
auto file = Helper::GetUserDataDir();
file.SetFullName(wxString::Format("%i.hsl", int(_messages[0].first / int(1e9))));
file.AppendDir("Logged");
auto filename = file.GetFullPath();
wxLogVerbose("saving %d messages to %s", _messages.size() - 1, filename);
// Create the containing directory if needed
if (!file.Mkdir(wxS_DIR_DEFAULT, wxPATH_MKDIR_FULL)) {
wxLogError("error creating save directory: %s", filename);
return;
}
// This should't happen, but check and log just in case
if (file.Exists()) {
wxLogWarning("overwriting existing game: %s", filename);
}
// Open the file
wxFileOutputStream fout(file.GetFullPath());
if (!fout.Ok()) {
wxLogError("error opening file: %s", filename);
return;
}
// Zip the data while saving it to save some bandwidth later when the file is uploaded
wxZlibOutputStream zout(fout, wxZ_BEST_COMPRESSION, wxZLIB_NO_HEADER);
// Add header info
// <nanotime>
// 48 53 4C 48 09 00 00 00
// 09 XX XX XX XX XX XX XX XX
auto version = Helper::GetHearthstoneVersion();
zout.Write(&_messages[0].first, 8)
.Write("HSLH\t\0\0\0\t", 9) // HSLH 09000000 09
.Write(&version, 8);
// Add the rest of the data
auto size = 25;
for (auto i = 1u; i < _messages.size(); i++) {
auto time = _messages[i].first;
auto msg = _messages[i].second;
size += 8 + msg.size();
zout.Write(&time, 8).Write(msg.data(), msg.size());
}
zout.Close();
wxLogVerbose("saved %d messages from %s (%d bytes, %lld compressed)", _messages.size() - 1, _name, size, fout.GetLength());
// Notify the app that it can upload the log file
HearthLogApp::UploadLog(filename);
}
开发者ID:ChooJeremy,项目名称:HearthLog,代码行数:58,代码来源:GameLogger.cpp
示例7: GetFullPath
bool C_file::RenameFile(const wchar *old_name, const wchar *new_name){
Cstr_w old_full, new_full;
GetFullPath(old_name, old_full);
GetFullPath(new_name, new_full);
#ifndef _WIN32_WCE
//don't allow renaming (move) accross drives (helps to catch bugs)
if(ToLower(old_full[0])!=ToLower(new_full[0]))
return false;
#endif
return win::MoveFile(old_full, new_full);
}
开发者ID:turbanoff,项目名称:X-plore,代码行数:12,代码来源:C_file.cpp
示例8: while
void CFileAndFolder::OnOK()
{
UINT count = m_Tree.GetSelectedCount();
if (count) {
HTREEITEM htree = m_Tree.GetFirstSelectedItem();
m_sSelections.AddTail(GetFullPath(htree));
while ((htree = m_Tree.GetNextSelectedItem(htree)) != NULL) {
m_sSelections.AddTail(GetFullPath(htree));
}
}
CDialog::OnOK();
}
开发者ID:mikemakuch,项目名称:muzikbrowzer,代码行数:13,代码来源:FileAndFolder.cpp
示例9: LoadAttributeFileWAV
bool LoadAttributeFileWAV(FILE_INFO *pFileMP3)
{
CRiffSIF riff;
wchar_t ext[_MAX_EXT];
_tsplitpath(GetFullPath(pFileMP3), NULL, NULL, NULL, ext);
if(_strcmpi(ext, ".wav") == 0){
if(riff.Load(GetFullPath(pFileMP3),'W','A','V','E') != ERROR_SUCCESS){
return false;
}
}
else if(_strcmpi(ext, ".avi") == 0){
if(riff.Load(GetFullPath(pFileMP3),'A','V','I',' ') != ERROR_SUCCESS){
return false;
}
//ISBJ songname
SetTrackNameSI(pFileMP3, riff.GetField('I','S','B','J'));
}
else{
return false;
}
//INAM/ISBJ タイトル
//ISBJ よりも INAM を優先
SetTrackNameSI(pFileMP3, riff.GetField('I','N','A','M'));
if(wcslen(GetTrackNameSI(pFileMP3)) == 0){
SetTrackNameSI(pFileMP3, riff.GetField('I','S','B','J'));
}
//IART アーティスト名
SetArtistNameSI(pFileMP3, riff.GetField('I','A','R','T'));
//IPRD アルバム名
SetAlbumNameSI(pFileMP3, riff.GetField('I','P','R','D'));
//ICMT コメント
SetCommentSI(pFileMP3, riff.GetField('I','C','M','T'));
//ICRD 日付
SetYearSI(pFileMP3, riff.GetField('I','C','R','D'));
//IGNR ジャンル
SetGenreSI(pFileMP3, riff.GetField('I','G','N','R'));
//ICOP 著作権
SetCopyrightSI(pFileMP3, riff.GetField('I','C','O','P'));
//IENG エンジニア
SetEngineerSI(pFileMP3, riff.GetField('I','E','N','G'));
//ISRC ソース
SetSourceSI(pFileMP3, riff.GetField('I','S','R','C'));
//ISFT ソフトウェア
SetSoftwareSI(pFileMP3, riff.GetField('I','S','F','T'));
//ITRK トラック番号
SetTrackNumberSI(pFileMP3, riff.GetField('I','T','R','K'));
extern bool GetValues_mp3infp(FILE_INFO *pFileMP3);
GetValues_mp3infp(pFileMP3);
return true;
}
开发者ID:leiqunni,项目名称:STEP_Unicode,代码行数:51,代码来源:wavavi.cpp
示例10: PrintLog
void CNFS2Prog::ProcedureRENAME(void)
{
char *path;
char pathFrom[MAXPATHLEN], *pathTo;
PrintLog("RENAME");
path = GetFullPath();
if (!CheckFile(path))
return;
strcpy(pathFrom, path);
pathTo = GetFullPath();
RenameFile(pathFrom, pathTo);
m_pOutStream->Write(NFS_OK);
}
开发者ID:noodle1983,项目名称:winnfsd-nd,代码行数:15,代码来源:NFS2Prog.cpp
示例11: getAdvancedCfgFilename
void ADVANCED_CFG::loadFromConfigFile()
{
const auto k_advanced = getAdvancedCfgFilename();
if( !k_advanced.FileExists() )
{
wxLogTrace( AdvancedConfigMask, "File does not exist %s", k_advanced.GetFullPath() );
return;
}
wxLogTrace( AdvancedConfigMask, "Loading advanced config from: %s", k_advanced.GetFullPath() );
wxFileConfig file_cfg( "", "", k_advanced.GetFullPath() );
loadSettings( file_cfg );
}
开发者ID:johnbeard,项目名称:kicad,代码行数:15,代码来源:advanced_config.cpp
示例12: OnReglDelkey
//删除键 COMMAND_REG_DELKEY
void CRegDlg::OnReglDelkey()
{
// TODO: Add your command handler code here
REGMSG msg;
int index=m_list.GetSelectionMark();
CString FullPath=GetFullPath(SelectNode); //得到全路径
char bToken=getFatherPath(FullPath);
CString key=m_list.GetItemText(index,0); //得到键名
msg.size=FullPath.GetLength(); // 项名大小
msg.valsize=key.GetLength(); //键名大小
int datasize=sizeof(msg)+msg.size+msg.valsize+4;
char *buf=new char[datasize];
ZeroMemory(buf,datasize);
buf[0]=COMMAND_REG_DELKEY; //命令头
buf[1]=bToken; //主键
memcpy(buf+2,(void*)&msg,sizeof(msg)); //数据头
if(msg.size>0) //根键 就不用写项了
memcpy(buf+2+sizeof(msg),FullPath.GetBuffer(0),FullPath.GetLength()); //项值
memcpy(buf+2+sizeof(msg)+FullPath.GetLength(),key.GetBuffer(0),key.GetLength()); //键值
how=3;
this->index=index;
m_iocpServer->Send(m_pContext, (LPBYTE)(buf), datasize);
delete[] buf;
}
开发者ID:killbug2004,项目名称:ghost2013,代码行数:32,代码来源:RegDlg.cpp
示例13: getCurHistoryDisp
void HistoryDlg::OnTvnSelchangedTree(NMHDR *pNMHDR, LRESULT *pResult)
{
LPNMTREEVIEW pNMTreeView = reinterpret_cast<LPNMTREEVIEW>(pNMHDR);
*pResult = 0;
HistoryDisp *sHistoryDisp = getCurHistoryDisp();
if (sHistoryDisp == XPR_NULL)
return;
xpr_tchar_t sPath[XPR_MAX_PATH * 2] = {0};
HTREEITEM sTreeItem = mTreeCtrl.GetSelectedItem();
if (sTreeItem != XPR_NULL)
{
xpr_uint_t sIndex = getItemIndex(sTreeItem);
if (FXFILE_STL_IS_INDEXABLE(sIndex, *sHistoryDisp->mHistoryDeque))
{
HistoryDeque::const_reverse_iterator sReverseIterator = sHistoryDisp->mHistoryDeque->rbegin() + sIndex;
if (sReverseIterator != sHistoryDisp->mHistoryDeque->rend())
{
LPITEMIDLIST sFullPidl = *sReverseIterator;
if (sFullPidl != XPR_NULL)
{
if (IsFileSystem(sFullPidl))
GetName(sFullPidl, SHGDN_FORPARSING, sPath);
else
GetFullPath(sFullPidl, sPath);
}
}
}
}
SetDlgItemText(IDC_HISTORY_STATUS, sPath);
}
开发者ID:3rdexp,项目名称:fxfile,代码行数:34,代码来源:history_dlg.cpp
示例14: GetFullPath
void ProtocolHttp::EvalStatic(HttpRequest *httpRequest, HttpResponse *httpResponse)
{
//EventLog eventLog;
char msg[8192];
try
{
char *str = httpRequest->GetUrl();
string s = GetFullPath(str);
ifstream file(s);
if (file)
{
sprintf(msg, "Static %s\n", s.c_str());
//eventLog.WriteEventLogEntry2(msg, EVENTLOG_ERROR_TYPE);
httpResponse->SetStaticFileName(s);
httpResponse->WriteStatic(s.c_str());
}
else
{
sprintf(msg, "Static %s not found\n", s.c_str());
//eventLog.WriteEventLogEntry2(msg, EVENTLOG_ERROR_TYPE);
}
}
catch (...)
{
printf("Exception in SocketCompletionPortServer::EvalStatic \n");
exit(0);
}
}
开发者ID:MagnusTiberius,项目名称:iocphttpd,代码行数:30,代码来源:ProtocolHttp.cpp
示例15: AEOpenFiles
pascal OSErr AEOpenFiles(AppleEvent *theAppleEvent, AppleEvent *theReply,
long Refcon)
{
AEDescList docList;
AEKeyword keywd;
DescType returnedType;
Size actualSize;
long itemsInList;
FSSpec theSpec;
CInfoPBRec pb;
Str255 name;
short i;
if (AEGetParamDesc(theAppleEvent, keyDirectObject, typeAEList, &docList) !=
noErr) return;
if (AECountItems (&docList, &itemsInList) != noErr) return;
SetSelection (TEXTREC->teLength, TEXTREC->teLength);
for (i = 1; i <= itemsInList; i++) {
AEGetNthPtr (&docList, i, typeFSS, &keywd, &returnedType,
(Ptr) &theSpec, sizeof(theSpec), &actualSize);
GetFullPath(&theSpec, name);
P2CStr(name); // was: pstrterm(name);
if (xlload ((char *)name + 1, 1, 0) == 0) xlabort ("load error");
}
macputs ("> ");
PrepareForInput ();
}
开发者ID:AkiraShirase,项目名称:audacity,代码行数:29,代码来源:MacAE.c
示例16: PrintLog
nfsstat3 CNFS3Prog::ProcedureLOOKUP(void)
{
char *path;
nfs_fh3 object;
post_op_attr obj_attributes;
post_op_attr dir_attributes;
nfsstat3 stat;
PrintLog("LOOKUP");
std::string dirName;
std::string fileName;
ReadDirectory(dirName, fileName);
path = GetFullPath(dirName, fileName);
stat = CheckFile((char*)dirName.c_str(), path);
if (stat == NFS3_OK) {
GetFileHandle(path, &object);
obj_attributes.attributes_follow = GetFileAttributesForNFS(path, &obj_attributes.attributes);
}
dir_attributes.attributes_follow = GetFileAttributesForNFS((char*)dirName.c_str(), &dir_attributes.attributes);
Write(&stat);
if (stat == NFS3_OK) {
Write(&object);
Write(&obj_attributes);
}
Write(&dir_attributes);
return stat;
}
开发者ID:philr,项目名称:winnfsd,代码行数:35,代码来源:NFS3Prog.cpp
示例17: OneTimeInit
void OvrApp::OneTimeInit( const char * launchIntent )
{
// This is called by the VR thread, not the java UI thread.
MaterialParms materialParms;
materialParms.UseSrgbTextureFormats = false;
const char * scenePath = "Oculus/tuscany.ovrscene";
String SceneFile;
Array<String> SearchPaths;
const OvrStoragePaths & paths = app->GetStoragePaths();
paths.PushBackSearchPathIfValid(EST_SECONDARY_EXTERNAL_STORAGE, EFT_ROOT, "RetailMedia/", SearchPaths);
paths.PushBackSearchPathIfValid(EST_SECONDARY_EXTERNAL_STORAGE, EFT_ROOT, "", SearchPaths);
paths.PushBackSearchPathIfValid(EST_PRIMARY_EXTERNAL_STORAGE, EFT_ROOT, "RetailMedia/", SearchPaths);
paths.PushBackSearchPathIfValid(EST_PRIMARY_EXTERNAL_STORAGE, EFT_ROOT, "", SearchPaths);
if ( GetFullPath( SearchPaths, scenePath, SceneFile ) )
{
Scene.LoadWorldModel( SceneFile , materialParms );
}
else
{
LOG( "OvrApp::OneTimeInit SearchPaths failed to find %s", scenePath );
}
}
开发者ID:rshi-google,项目名称:test,代码行数:26,代码来源:OvrApp.cpp
示例18: GetWriteablePath
void GSceneSelector::CreatePlayingData()
{
gstring fullPath;
GetWriteablePath( USER_HAVEDATA_FILENAME, fullPath );
if( GnFileUtil::ExitsFile( fullPath.c_str() ) == false )
{
GnVerify( GnFileUtil::FileCopy( GetFullPath( USER_HAVEDATA_FILENAME ), fullPath.c_str() ) );
mPlayOpening = true;
}
GPlayingDataManager* playingDataManager = GPlayingDataManager::GetSingleton();
playingDataManager->LoadData();
guint32 curCount = playingDataManager->GetPlayingDataCount();
GPlayingData* data = NULL;
if( curCount == 0 )
{
data = playingDataManager->CreatePlayingData();
playingDataManager->AddPlayingData( data );
playingDataManager->SaveData();
}
else
data = playingDataManager->GetPlayingData( 0 );
playingDataManager->SetPlayingPlayerData( 0 );
}
开发者ID:issamux,项目名称:WebGame,代码行数:26,代码来源:GSceneSelector.cpp
示例19: info
QString NCXResource::GetRelativePathToRoot() const
{
QFileInfo info(GetFullPath());
QDir parent_dir = info.dir();
QString parent_name = parent_dir.dirName();
return parent_name + "/" + Filename();
}
开发者ID:Sigil-Ebook,项目名称:Sigil,代码行数:7,代码来源:NCXResource.cpp
示例20: SetCookieUsage
void SetCookieUsage(const EA::WebKit::CookieInfo& cookieInfo)
{
if (!cookieInfo.mCookieFilePath || !cookieInfo.mCookieFilePath[0] )
{
EAW_ASSERT_MSG(false,"Cookies persistence disabled. Invalid cookie file path.");
return;
}
const char8_t* pCookieFilePath = cookieInfo.mCookieFilePath;
EA::IO::Path::PathString8 fullPath;
if(pCookieFilePath)
{
fullPath.assign(GetFullPath(pCookieFilePath, true));
if(!fullPath.empty())
{
pCookieFilePath = fullPath.c_str();
}
}
WebCore::ResourceHandleManager* pRHM = WebCore::ResourceHandleManager::sharedInstance();
EA::WebKit::CookieManager* pCM = pRHM->GetCookieManager();
CookieManagerParameters params(pCookieFilePath, cookieInfo.mMaxIndividualCookieSize,
cookieInfo.mDiskCookieStorageSize, cookieInfo.mMaxCookieCount);
pCM->SetParametersAndInitialize(params);
}
开发者ID:emuikernel,项目名称:EAWebKit,代码行数:26,代码来源:EAWebKit.cpp
注:本文中的GetFullPath函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论