# PhasicFlow: fileSystem Class Reference

fileSystem Class Reference

## Public Types

typedef std::filesystem::path | pathType

## Public Member Functions

| fileSystem ()
| fileSystem (const word &dir, const word &file="")
| fileSystem (const char *dir, const char *file="")
| fileSystem (const pathType &path)
| fileSystem (const fileSystem &)=default
| fileSystem (fileSystem &&)=default
fileSystem & | operator= (const fileSystem &)=default
fileSystem & | operator= (fileSystem &&)=default
| ~fileSystem ()=default
bool | isDir () const
const pathType & | path () const
word | wordPath () const
fileSystem | dirPath () const
word | fileName () const
fileSystem | absolute () const
fileSystem | canonical () const
bool | dirExist () const
bool | exist () const
fileSystem | createDirs () const
void | operator+= (const word &fileName)
void | operator/= (const fileSystem &fs)
fileSystem | operator() (bool retDir=true) const

## Static Public Member Functions

static fileSystem | CWD ()

## Static Protected Member Functions

static bool | validFileName (const word &name)
static bool | checkFileName (const word &name)

## Protected Attributes

std::filesystem::path | path_
bool | isDir_

## Static Protected Attributes

static word | notPermittedCharsFile = word(" ") + word("\t\n\0;:?*/<>\"?\'")

## Friends

fileSystem | operator/ (const fileSystem &fs1, const fileSystem &fs2)
iOstream & | operator<< (iOstream &os, fileSystem fs)
std::ostream & | operator<< (std::ostream &os, fileSystem fs)

## Detailed Description

Definition at line 63 of file fileSystem.hpp.

## Member Typedef Documentation

## pathType

typedef std::filesystem::path pathType

Definition at line 93 of file fileSystem.hpp.

## Constructor & Destructor Documentation

## fileSystem() [1/6]

fileSystem | ( |  | ) |

inline

Definition at line 96 of file fileSystem.hpp.

Referenced by fileSystem::CWD().

Here is the caller graph for this function:

## fileSystem() [2/6]

fileSystem | ( | const word & | dir,
|  | const word & | file = `""`
| ) |  |

Definition at line 45 of file fileSystem.cpp.

References pFlow::endl(), fatalErrorInFunction, and fatalExit.

Here is the call graph for this function:

## fileSystem() [3/6]

fileSystem | ( | const char * | dir,
|  | const char * | file = `""`
| ) |  |

Definition at line 68 of file fileSystem.cpp.

## fileSystem() [4/6]

fileSystem | ( | const pathType & | path | ) |

Definition at line 75 of file fileSystem.cpp.

References fileSystem::isDir_, and pFlow::isDirectory().

Here is the call graph for this function:

## fileSystem() [5/6]

fileSystem | ( | const fileSystem & |  | ) |

default

## fileSystem() [6/6]

fileSystem | ( | fileSystem && |  | ) |

default

## ~fileSystem()

~fileSystem | ( |  | ) |

default

## Member Function Documentation

## validFileName()

static bool validFileName | ( | const word & | name | ) |

inlinestaticprotected

Definition at line 76 of file fileSystem.hpp.

References fileSystem::notPermittedCharsFile.

Referenced by fileSystem::checkFileName().

Here is the caller graph for this function:

## checkFileName()

bool checkFileName | ( | const word & | name | ) |

staticprotected

Definition at line 27 of file fileSystem.cpp.

References pFlow::endl(), fatalErrorInFunction, fatalExit, fileSystem::notPermittedCharsFile, and fileSystem::validFileName().

Here is the call graph for this function:

## CWD()

static fileSystem CWD | ( |  | ) |

inlinestatic

Definition at line 85 of file fileSystem.hpp.

References fileSystem::fileSystem().

Referenced by pFlow::CWD().

Here is the call graph for this function:
Here is the caller graph for this function:

## operator=() [1/2]

fileSystem& operator= | ( | const fileSystem & |  | ) |

default

## operator=() [2/2]

fileSystem& operator= | ( | fileSystem && |  | ) |

default

## isDir()

bool isDir | ( |  | ) | const

inline

Definition at line 116 of file fileSystem.hpp.

References fileSystem::isDir_.

## path()

const pathType& path | ( |  | ) | const

inline

Definition at line 121 of file fileSystem.hpp.

References fileSystem::path_.

Referenced by pFlow::containingFiles(), pFlow::isDirectory(), pFlow::isRegularFile(), IOfileHeader::path(), repository::path(), and pFlow::subDirectories().

Here is the caller graph for this function:

## wordPath()

word wordPath | ( |  | ) | const

inline

Definition at line 126 of file fileSystem.hpp.

References fileSystem::path_.

Referenced by pFlow::PFtoVTK::convertTimeFolderPointFieldsSelected(), systemControl::getRunName(), systemControl::getTopFolder(), fileStream::openInFile(), and fileStream::openOutFile().

Here is the caller graph for this function:

## dirPath()

pFlow::fileSystem dirPath | ( |  | ) | const

Definition at line 82 of file fileSystem.cpp.

Referenced by fileStream::openOutFile(), and pFlow::operator/().

Here is the caller graph for this function:

## fileName()

pFlow::word fileName | ( |  | ) | const

Definition at line 96 of file fileSystem.cpp.

References pFlow::endl(), fatalErrorInFunction, and fatalExit.

Referenced by Insertion< ShapeType >::Insertion().

Here is the call graph for this function:
Here is the caller graph for this function:

## absolute()

pFlow::fileSystem absolute | ( |  | ) | const

Definition at line 116 of file fileSystem.cpp.

References pFlow::endl(), fatalErrorInFunction, fatalExit, fileSystem::isDir_, and fileSystem::path_.

Here is the call graph for this function:

## canonical()

pFlow::fileSystem canonical | ( |  | ) | const

Definition at line 140 of file fileSystem.cpp.

References pFlow::endl(), fatalErrorInFunction, fatalExit, fileSystem::isDir_, and fileSystem::path_.

Referenced by systemControl::getRunName(), and systemControl::getTopFolder().

Here is the call graph for this function:
Here is the caller graph for this function:

## dirExist()

bool dirExist | ( |  | ) | const

Definition at line 162 of file fileSystem.cpp.

References pFlow::endl(), fatalErrorInFunction, and fatalExit.

Here is the call graph for this function:

## exist()

bool exist | ( |  | ) | const

Definition at line 179 of file fileSystem.cpp.

References pFlow::endl(), fatalErrorInFunction, and fatalExit.

Referenced by fileStream::openInFile().

Here is the call graph for this function:
Here is the caller graph for this function:

## createDirs()

pFlow::fileSystem createDirs | ( |  | ) | const

Definition at line 196 of file fileSystem.cpp.

References pFlow::endl(), fatalErrorInFunction, and fatalExit.

Referenced by fileStream::openOutFile().

Here is the call graph for this function:
Here is the caller graph for this function:

## operator+=()

void operator+= | ( | const word & | fileName | ) |

Definition at line 233 of file fileSystem.cpp.

## operator/=()

void operator/= | ( | const fileSystem & | fs | ) |

Definition at line 250 of file fileSystem.cpp.

References pFlow::endl(), fatalErrorInFunction, and fatalExit.

Here is the call graph for this function:

## operator()()

pFlow::fileSystem operator() | ( | bool | retDir = `true` | ) | const

Definition at line 223 of file fileSystem.cpp.

## Friends And Related Function Documentation

## operator/

fileSystem operator/ | ( | const fileSystem & | fs1,
|  | const fileSystem & | fs2
| ) |  |

friend

## operator<< [1/2]

iOstream& operator<< | ( | iOstream & | os,
|  | fileSystem | fs
| ) |  |

friend

## operator<< [2/2]

std::ostream& operator<< | ( | std::ostream & | os,
|  | fileSystem | fs
| ) |  |

friend

## Member Data Documentation

## path_

std::filesystem::path path_

protected

Definition at line 67 of file fileSystem.hpp.

Referenced by fileSystem::absolute(), fileSystem::canonical(), pFlow::operator/(), pFlow::operator<<(), fileSystem::path(), and fileSystem::wordPath().

## isDir_

bool isDir_

protected

Definition at line 68 of file fileSystem.hpp.

Referenced by fileSystem::absolute(), fileSystem::canonical(), fileSystem::fileSystem(), and fileSystem::isDir().

## notPermittedCharsFile

word notPermittedCharsFile = word(" ") + word("\t\n\0;:?*/<>\"?\'")

inlinestaticprotected

Definition at line 72 of file fileSystem.hpp.

Referenced by fileSystem::checkFileName(), and fileSystem::validFileName().

The documentation for this class was generated from the following files:

- src/phasicFlow/fileSystem/fileSystem.hpp
- src/phasicFlow/fileSystem/fileSystem.cpp