1 #ifndef TAG_PARSER_BASICFILEINFO_H 2 #define TAG_PARSER_BASICFILEINFO_H 6 #include <c++utilities/conversion/types.h> 7 #include <c++utilities/io/nativefilestream.h> 22 void open(
bool readOnly =
false);
23 void reopen(
bool readonly =
false);
25 bool isReadOnly()
const;
28 IoUtilities::NativeFileStream &stream();
29 const IoUtilities::NativeFileStream &stream()
const;
32 const std::string &path()
const;
33 void setPath(
const std::string &path);
34 static std::string fileName(
const std::string &path,
bool cutExtension =
false);
35 std::string fileName(
bool cutExtension =
false)
const;
36 static std::string extension(
const std::string &path);
37 std::string extension()
const;
38 static std::string pathWithoutExtension(
const std::string &fullPath);
39 std::string pathWithoutExtension()
const;
40 static std::string containingDirectory(
const std::string &path);
41 std::string containingDirectory()
const;
45 void reportSizeChanged(uint64 newSize);
46 void reportPathChanged(
const std::string &newPath);
49 virtual void invalidated();
53 IoUtilities::NativeFileStream m_file;
65 return m_file.is_open();
134 #endif // TAG_PARSER_BASICFILEINFO_H const std::string & path() const
Returns the path of the current file.
bool isReadOnly() const
Indicates whether the last open()/reopen() call was read-only.
void reportPathChanged(const std::string &newPath)
Call this function to report that the path changed.
void reportSizeChanged(uint64 newSize)
Call this function to report that the size changed.
uint64 size() const
Returns size of the current file in bytes.
IoUtilities::NativeFileStream & stream()
Returns the std::fstream for the current instance.
bool isOpen() const
Indicates whether a std::fstream is open for the current file.
Contains all classes and functions of the TagInfo library.
#define TAG_PARSER_EXPORT
Marks the symbol to be exported by the tagparser library.
The BasicFileInfo class provides basic file information such as file name, extension,...