Skip to content

Decided to add a few good functionality to fstream. It is the simple wrapper for it. I will probably add some more in the future (I've just made it).

Notifications You must be signed in to change notification settings

GrandfatherTECH/better-fstream

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

So here's the functionality:

  • Stores the file path - 'string filePath' var.
  • Get the current file path - 'getpath()' func.
  • Open the file with storing the file path into 'filaPath' var. It is overloaded for 'char*' and 'string&' paths - 'open()' func.
  • Reopen the file and store the new file path value to filePath - custom overloaded 'open()' func for 'char*' and 'string&' paths.
  • Clear the file (closes the file and reopens it with 'out', 'in' and 'trunc' flags) - 'clear()' func. Note that this funtions calls 'fstream::close()' instead of its own 'close()' func because its own func clears the 'filePath' var.
  • Closes the file with clearing the 'filePath' var (actually calls 'fstream::clear()' func and then clears 'filePath' var) - 'close()' func.

Inheritance:

The class is called 'bfstream' and is inherited from 'fstream'.

About

Decided to add a few good functionality to fstream. It is the simple wrapper for it. I will probably add some more in the future (I've just made it).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages