本文整理汇总了C++中Archive::IsArcDir方法的典型用法代码示例。如果您正苦于以下问题:C++ Archive::IsArcDir方法的具体用法?C++ Archive::IsArcDir怎么用?C++ Archive::IsArcDir使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Archive
的用法示例。
在下文中一共展示了Archive::IsArcDir方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ExtractCurrentFile
//.........这里部分代码省略.........
}
#ifndef RARDLL
if (!ReconstructDone)
{
ReconstructDone=true;
if (RecVolumesRestore(Cmd,Arc.FileName,true))
{
Repeat=true;
return false;
}
}
#endif
wcsncpyz(ArcName,CurVolName,ASIZE(ArcName));
}
#endif
wchar ArcFileName[NM];
ConvertPath(Arc.FileHead.FileName,ArcFileName);
if (Arc.FileHead.Version)
{
if (Cmd->VersionControl!=1 && !EqualNames)
{
if (Cmd->VersionControl==0)
MatchFound=false;
int Version=ParseVersionFileName(ArcFileName,false);
if (Cmd->VersionControl-1==Version)
ParseVersionFileName(ArcFileName,true);
else
MatchFound=false;
}
}
else
if (!Arc.IsArcDir() && Cmd->VersionControl>1)
MatchFound=false;
DataIO.UnpVolume=Arc.FileHead.SplitAfter;
DataIO.NextVolumeMissing=false;
Arc.Seek(Arc.NextBlockPos-Arc.FileHead.PackSize,SEEK_SET);
bool ExtrFile=false;
bool SkipSolid=false;
#ifndef SFX_MODULE
if (FirstFile && (MatchFound || Arc.Solid) && Arc.FileHead.SplitBefore)
{
if (MatchFound)
{
uiMsg(UIERROR_NEEDPREVVOL,Arc.FileName,ArcFileName);
#ifdef RARDLL
Cmd->DllError=ERAR_BAD_DATA;
#endif
ErrHandler.SetErrorCode(RARX_OPEN);
}
MatchFound=false;
}
FirstFile=false;
#endif
if (MatchFound || (SkipSolid=Arc.Solid)!=0)
{
// First common call of uiStartFileExtract. It is done before overwrite
// prompts, so if SkipSolid state is changed below, we'll need to make
// additional uiStartFileExtract calls with updated parameters.
示例2: ExtractCurrentFile
//.........这里部分代码省略.........
#endif
wchar *DestNameW=WideName ? DestFileNameW:NULL;
#ifdef UNICODE_SUPPORTED
if (WideName)
{
ConvertPath(Arc.NewLhd.FileNameW,ArcFileNameW);
char Name[NM];
if (WideToChar(ArcFileNameW,Name) && IsNameUsable(Name))
strcpy(ArcFileName,Name);
}
#endif
ConvertPath(ArcFileName,ArcFileName);
if (Arc.IsArcLabel())
return(true);
if (Arc.NewLhd.Flags & LHD_VERSION)
{
if (Cmd->VersionControl!=1 && !EqualNames)
{
if (Cmd->VersionControl==0)
ExactMatch=false;
int Version=ParseVersionFileName(ArcFileName,ArcFileNameW,false);
if (Cmd->VersionControl-1==Version)
ParseVersionFileName(ArcFileName,ArcFileNameW,true);
else
ExactMatch=false;
}
}
else
if (!Arc.IsArcDir() && Cmd->VersionControl>1)
ExactMatch=false;
Arc.ConvertAttributes();
#ifndef SFX_MODULE
if ((Arc.NewLhd.Flags & (LHD_SPLIT_BEFORE/*|LHD_SOLID*/)) && FirstFile)
{
char CurVolName[NM];
strcpy(CurVolName,ArcName);
VolNameToFirstName(ArcName,ArcName,(Arc.NewMhd.Flags & MHD_NEWNUMBERING)!=0);
if (stricomp(ArcName,CurVolName)!=0 && FileExist(ArcName))
{
*ArcNameW=0;
Repeat=true;
return(false);
}
#if !defined(RARDLL) && !defined(_WIN_CE)
if (!ReconstructDone)
{
ReconstructDone=true;
RecVolumes RecVol;
if (RecVol.Restore(Cmd,Arc.FileName,Arc.FileNameW,true))
{
Repeat=true;
return(false);
}
}
#endif
strcpy(ArcName,CurVolName);
}
示例3: ExtractCurrentFile
//.........这里部分代码省略.........
#ifndef RARDLL
if (!ReconstructDone)
{
ReconstructDone=true;
if (RecVolumesRestore(Cmd,Arc.FileName,true))
{
Repeat=true;
return false;
}
}
#endif
wcsncpyz(ArcName,CurVolName,ASIZE(ArcName));
}
#endif
wchar ArcFileName[NM];
ConvertPath(Arc.FileHead.FileName,ArcFileName);
if (Arc.FileHead.Version)
{
if (Cmd->VersionControl!=1 && !EqualNames)
{
if (Cmd->VersionControl==0)
ExactMatch=false;
int Version=ParseVersionFileName(ArcFileName,false);
if (Cmd->VersionControl-1==Version)
ParseVersionFileName(ArcFileName,true);
else
ExactMatch=false;
}
}
else
if (!Arc.IsArcDir() && Cmd->VersionControl>1)
ExactMatch=false;
DataIO.UnpVolume=Arc.FileHead.SplitAfter;
DataIO.NextVolumeMissing=false;
Arc.Seek(Arc.NextBlockPos-Arc.FileHead.PackSize,SEEK_SET);
bool ExtrFile=false;
bool SkipSolid=false;
#ifndef SFX_MODULE
if (FirstFile && (ExactMatch || Arc.Solid) && Arc.FileHead.SplitBefore)
{
if (ExactMatch)
{
Log(Arc.FileName,St(MUnpCannotMerge),ArcFileName);
#ifdef RARDLL
Cmd->DllError=ERAR_BAD_DATA;
#endif
ErrHandler.SetErrorCode(RARX_OPEN);
}
ExactMatch=false;
}
FirstFile=false;
#endif
if (ExactMatch || (SkipSolid=Arc.Solid)!=0)
{
ExtrPrepareName(Cmd,Arc,ArcFileName,DestFileName,ASIZE(DestFileName));
示例4: ExtractCurrentFile
//.........这里部分代码省略.........
#ifdef UNICODE_SUPPORTED
if (WideName)
{
// Prepare the name in single byte native encoding (typically UTF-8
// for Unix-based systems). Windows does not really need it,
// but Unix system will use this name instead of Unicode.
ConvertPath(Arc.NewLhd.FileNameW,ArcFileNameW);
char Name[NM];
if (WideToChar(ArcFileNameW,Name) && IsNameUsable(Name))
strcpy(ArcFileName,Name);
}
#endif
ConvertPath(ArcFileName,ArcFileName);
if (Arc.IsArcLabel())
return(true);
if (Arc.NewLhd.Flags & LHD_VERSION)
{
if (Cmd->VersionControl!=1 && !EqualNames)
{
if (Cmd->VersionControl==0)
ExactMatch=false;
int Version=ParseVersionFileName(ArcFileName,ArcFileNameW,false);
if (Cmd->VersionControl-1==(unsigned) Version)
ParseVersionFileName(ArcFileName,ArcFileNameW,true);
else
ExactMatch=false;
}
}
else
if (!Arc.IsArcDir() && Cmd->VersionControl>1)
ExactMatch=false;
Arc.ConvertAttributes();
#ifndef SFX_MODULE
if ((Arc.NewLhd.Flags & LHD_SPLIT_BEFORE)!=0 && FirstFile)
{
char CurVolName[NM];
strcpy(CurVolName,ArcName);
bool NewNumbering=(Arc.NewMhd.Flags & MHD_NEWNUMBERING)!=0;
VolNameToFirstName(ArcName,ArcName,NewNumbering);
if (*ArcNameW!=0)
VolNameToFirstName(ArcNameW,ArcNameW,NewNumbering);
if (stricomp(ArcName,CurVolName)!=0 && FileExist(ArcName,ArcNameW))
{
// If first volume name does not match the current name and if
// such volume name really exists, let's unpack from this first volume.
Repeat=true;
return(false);
}
#if !defined(RARDLL) && !defined(_WIN_CE)
if (!ReconstructDone)
{
ReconstructDone=true;
}
#endif
strcpy(ArcName,CurVolName);
}
#endif
DataIO.UnpVolume=(Arc.NewLhd.Flags & LHD_SPLIT_AFTER)!=0;