当前位置: 首页>>代码示例>>C++>>正文


C++ GetFullPath函数代码示例

本文整理汇总了C++中GetFullPath函数的典型用法代码示例。如果您正苦于以下问题:C++ GetFullPath函数的具体用法?C++ GetFullPath怎么用?C++ GetFullPath使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了GetFullPath函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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


注:本文中的GetFullPath函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。