bool SoundWrapperBase::LoadFromFile(const std::string &filename, const RuntimeScene &scene) { if(LoadFromFileImpl(filename, scene)) { m_filename = filename; return true; } else { return false; } }
HRESULT COfficeXlsFile::LoadFromFile(BSTR sSrcFileName, BSTR sDstPath, BSTR sXMLOptions) { HRESULT hr = AVS_ERROR_UNEXPECTED; if (!sDstPath) { _ASSERTE(!!sDstPath); return E_FAIL; } #if defined(STANDALONE_USE) && (STANDALONE_USE == 1) std::wstring outputDir = FileSystem::Directory::GetFolderPath(std::wstring(sDstPath)); #else std::wstring outputDir = sDstPath; #endif #if defined(STANDALONE_USE) && (STANDALONE_USE == 1) std::wstring dstTempPath = FileSystem::Directory::CreateDirectoryWithUniqueName(outputDir); #else std::wstring dstTempPath = outputDir; #endif try { hr = LoadFromFileImpl(bstr2wstring(sSrcFileName), dstTempPath, bstr2wstring(sDstPath)); } catch(...) { hr = E_FAIL; } #if defined(STANDALONE_USE) && (STANDALONE_USE == 1) // в случае если на выходе файл Ч стираем временную директорию (мы сами ее создали) try { FileSystem::Directory::DeleteDirectory(dstTempPath); } catch(...) { } #endif return hr; }
IO::Error LoadFromFile(Clob& out, const AnyString& filename, uint64 hardlimit) { return LoadFromFileImpl(out, filename, hardlimit); }