|
SNAP Library, Developer Reference
2012-10-15 15:06:59
SNAP, a general purpose network analysis and graph mining library
|

Go to the source code of this file.
Classes | |
| class | TDir |
| class | TFPathNotify |
Functions | |
| TFFileDesc () | |
| static PFFileDesc | New () |
| ~TFFileDesc () | |
| TFFileDesc (TSIn &) | |
| static PFFileDesc | Load (TSIn &SIn) |
| void | Save (TSOut &) |
| TFFileDesc & | operator= (const TFFileDesc &) |
| TStr | GetFBase () const |
| bool | IsDir () const |
| UndefDefaultCopyAssign (TFFile) | |
| TFFile (const TStr &_FNmWc, const bool &_RecurseP=false) | |
| TFFile (const TStr &_FPath, const TStr &_FExt, const bool &_RecurseP=false) | |
| TFFile (const TStrV &_FPathV, const TStrV &_FExtV, const TStr &_FBaseWc, const bool &_RecurseP) | |
| static PFFile | New (const TStr &FNmWc, const bool &RecurseP) |
| static PFFile | New (const TStrV &FPathV, const TStrV &FExtV, const TStr FBaseWc, const bool &RecurseP) |
| static PFFile | New (const TStr &FPath, const TStr &FExt, const bool &RecurseP) |
| ~TFFile () | |
| TFFile (TSIn &) | |
| bool | Next (TStr &FNm) |
| bool | Next () |
| TStr | GetFNm () const |
| int | GetFNmN () const |
| static void | GetFNmV (const TStr &FPath, const TStrV &FExtV, const bool &RecurseP, TStrV &FNmV) |
Variables | |
| ClassTP(TFFileDesc, PFFileDesc) public dirent * | DirEnt |
| ClassTP(TFFile, PFFile) private TStr | FBaseWc |
| bool | CsImpP |
| bool | RecurseP |
| int | FPathN |
| PFFileDesc | FFileDesc |
| PFFile | SubFFile |
| TStr | CurFNm |
| int | CurFNmN |
| void TFFile::GetFNmV | ( | const TStr & | FPath, |
| const TStrV & | FExtV, | ||
| const bool & | RecurseP, | ||
| TStrV & | FNmV | ||
| ) | [static] |
Definition at line 215 of file xfl.cpp.
References TVec< TVal >::Add(), TVec< TVal >::Clr(), FNm, and TFFile().
{
// prepare file-directory traversal
TStrV FPathV; FPathV.Add(FPath);
TFFile FFile(FPathV, FExtV, "", RecurseP); TStr FNm;
// traverse directory
FNmV.Clr();
while (FFile.Next(FNm)){
FNmV.Add(FNm);
}
}

| bool IsDir | ( | ) | const |
Definition at line 65 of file xfl.h.
References FFileDesc.
Referenced by TBigNet< TNodeData, IsDir >::AddNode(), TBigNet< TNodeData, IsDir >::AddUndirNode(), TSnap::CntEdgesToSet(), TBigNet< TNodeData, IsDir >::Dump(), TSnap::GenCircle(), TSnap::GenGrid(), TSnap::GenStar(), TSnap::GetAnfEffDiam(), TSnap::GetNodeTriads(), TBigNet< TNodeData, IsDir >::GetSubGraph(), TSnap::GetTriadEdges(), TSnap::GetTriads(), TAGM::GVizComGraph(), TBigNet< TNodeData, IsDir >::InvertFromSources(), TNEGraph::IsEdge(), TNodeEdgeNet< TSecTm, TSecTm >::IsEdge(), TBigNet< TNodeData, IsDir >::IsolateNode(), TBigNet< TNodeData, IsDir >::Rewire(), TBigNet< TNodeData, IsDir >::Save(), TBigNet< TNodeData, IsDir >::SaveForDisk(), TSnap::SaveGViz(), TBigNet< TNodeData, IsDir >::SortEdgeV(), and TBigNet< TNodeData, IsDir >::TBigNet().
{
return FFileDesc->IsDir();}

Definition at line 17 of file xfl.h.
References TFFileDesc().
{return new TFFileDesc(SIn);}

| static PFFileDesc New | ( | ) | [static] |
Definition at line 14 of file xfl.h.
References TFFileDesc().
{return PFFileDesc(new TFFileDesc());}

| bool Next | ( | ) |
Definition at line 58 of file xfl.h.
Referenced by TBreathFS< PGraph >::GetRndPath(), Next(), TVec< TVal >::NextPerm(), TVec< TVal >::PrevPerm(), and THash< TKey, TDat, THashFunc >::Sort().


| TFFileDesc& operator= | ( | const TFFileDesc & | ) |
| TFFile::TFFile | ( | const TStr & | _FNmWc, |
| const bool & | _RecurseP = false |
||
| ) |
Definition at line 37 of file xfl.cpp.
References CsImpP, FBaseWc, TStr::GetFBase(), TStr::GetFPath(), TStr::GetNrFPath(), and TStr::ToUc().
Referenced by TFile::DelWc(), GetFNmV(), New(), and TNcpGraphsBase::TNcpGraphsBase().
: FPathV(), FExtV(), FBaseWc(), CsImpP(false), RecurseP(_RecurseP), FPathN(0-1), FFileDesc(TFFileDesc::New()), SubFFile(), CurFNm(), CurFNmN(0-1){ // prepare file-base-name wild-card FBaseWc=FNmWc.GetFBase(); if (!CsImpP){FBaseWc.ToUc();} // get & assign file-name TStr FPath=FNmWc.GetFPath(); FPathV.Add(TStr::GetNrFPath(FPath)); }


| TFFile::TFFile | ( | const TStr & | _FPath, |
| const TStr & | _FExt, | ||
| const bool & | _RecurseP = false |
||
| ) |
Definition at line 48 of file xfl.cpp.
References CsImpP, TStr::Empty(), TStr::GetNrFExt(), and TStr::GetNrFPath().
: FPathV(), FExtV(), FBaseWc(), CsImpP(false), RecurseP(_RecurseP), FPathN(0-1), FFileDesc(TFFileDesc::New()), SubFFile(), CurFNm(), CurFNmN(0-1){ FPathV.Add(TStr::GetNrFPath(_FPath)); if (!_FExt.Empty()){ FExtV.Add(TStr::GetNrFExt(_FExt)); if (!CsImpP){FExtV.Last().ToUc();} } }

| TFFile::TFFile | ( | const TStrV & | _FPathV, |
| const TStrV & | _FExtV, | ||
| const TStr & | _FBaseWc, | ||
| const bool & | _RecurseP | ||
| ) |
Definition at line 59 of file xfl.cpp.
References CsImpP, FBaseWc, FPathN, TStr::GetNrFExt(), TStr::GetNrFPath(), and TStr::ToUc().
: FPathV(_FPathV), FExtV(_FExtV), FBaseWc(_FBaseWc), CsImpP(false), RecurseP(_RecurseP), FPathN(0-1), FFileDesc(TFFileDesc::New()), SubFFile(), CurFNm(), CurFNmN(0-1){ // prepare file-paths for (int FPathN=0; FPathN<FPathV.Len(); FPathN++){ FPathV[FPathN]=TStr::GetNrFPath(FPathV[FPathN]);} // prepare file-extensions for (int FExtN=0; FExtN<FExtV.Len(); FExtN++){ FExtV[FExtN]=TStr::GetNrFExt(FExtV[FExtN]); if (!CsImpP){FExtV[FExtN].ToUc();} } // prepare file-base wild-card if (!CsImpP){FBaseWc.ToUc();} }

| TFFileDesc | ( | ) |
| ~TFFile | ( | ) |
| ~TFFileDesc | ( | ) |
| ClassTP (TFFileDesc, PFFileDesc) public dirent* DirEnt |