Class for working with file of... any format, including a text and just binary. More...
Public Member Functions | |
File () | |
Constructor for building an empty file-object. More... | |
File & | binary (const bool &v) |
Setter for binary mode of file. More... | |
bool | binary () const |
Getter a binary mode of file. More... | |
File & | extension (const std::string &) |
Setter for extension of file. More... | |
std::string | extension () const |
Getter for extension of file. More... | |
File & | fullPathFile (const std::string &v) |
Setter for full path with file name. More... | |
std::string | fullPathFile () const |
Getter for full path with file name. More... | |
File & | path (const std::string &) |
Setter for path of file. More... | |
std::string | path () const |
Getter for path of file. More... | |
template<class T > | |
File & | operator= (const T &) |
Write to file with erase it. More... | |
template<class T > | |
File & | append (const T &) |
Write to file with append to it. More... | |
template<class T > | |
File & | operator+= (const T &v) |
Write to file with append to it. More... | |
File & | remove () |
Removes the file. More... | |
template<> | |
File & | operator= (const FormatBinary &b) |
template<> | |
File & | operator= (const FormatDAE &b) |
template<> | |
File & | operator= (const FormatFBX &b) |
template<> | |
File & | operator= (const FormatOBJ &b) |
template<> | |
File & | append (const FormatBinary &b) |
template<> | |
File & | append (const unsigned char &d) |
Class for working with file of... any format, including a text and just binary.
|
inline |
Constructor for building an empty file-object.
|
inline |
Setter for binary mode of file.
File a( "a.data" );
a.binary( true );
|
inline |
Getter a binary mode of file.
File a( "a.dat", true );
bool r = a.binary();
File & coat::scripto::File::extension | ( | const std::string & | v | ) |
Setter for extension of file.
File a( "a" );
a.extension( "json" );
std::string coat::scripto::File::extension | ( | ) | const |
Getter for extension of file.
File a( "a.obj" );
string r = a.extension();
|
inline |
Setter for full path with file name.
File a( "3DCoat/examples/my/a.txt" );
a.fullPathFile( "3DCoat/examples/a1.txt" );
|
inline |
Getter for full path with file name.
File a( "3DCoat/examples/my/a.txt" );
string r = a.fullPathFile();
File & coat::scripto::File::path | ( | const std::string & | v | ) |
std::string coat::scripto::File::path | ( | ) | const |
Getter for path of file.
File a( "3DCoat/examples/my/a.fbx" );
string r = a.path();
File& coat::scripto::File::operator= | ( | const T & | ) |
Write to file with erase it.
File a( "3DCoat/examples/my/a.txt" );
a = "Line for demo...\n"
"and yet one, yes!";
File a( "3DCoat/examples/my/a" );
FormatBinary bin = { 0x46, 0x4c, 0x49, 0x46 };
a = bin;
File a( "3DCoat/examples/my/a" );
FormatFBX fbx;
// export the scene like FBX-format
a = fbx;
File& coat::scripto::File::append | ( | const T & | ) |
Write to file with append to it.
File a( "3DCoat/examples/my/a.txt" );
a += "Line for demo...\n"
"and yet, yes!";
File a( "3DCoat/examples/my/a" );
FormatBinary bin = { '.', '\r', '\n' };
a += bin;
|
inline |
Write to file with append to it.
File a( "3DCoat/examples/my/a.txt" );
a += "Line for demo...\n"
"and yet, yes!";
File a( "3DCoat/examples/my/a" );
FormatBinary bin = { '.', '\r', '\n' };
a += bin;