Commit 6101d988 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen
Browse files

fs: IFile: Use an unsigned value to represent a size

parent a6be240d
......@@ -48,7 +48,7 @@ namespace fs
virtual const std::string& mrl() const = 0;
virtual const std::string& extension() const = 0;
virtual time_t lastModificationDate() const = 0;
virtual int64_t size() const = 0;
virtual uint64_t size() const = 0;
virtual bool isNetwork() const = 0;
/**
* @brief type Returns the file type, or None if not linked with another file
......
......@@ -41,7 +41,7 @@ namespace libvlc
{
File::File( std::string mrl, fs::IFileSystemFactory& fsFactory,
time_t lastModificationDate, int64_t size )
time_t lastModificationDate, uint64_t size )
: CommonFile( std::move( mrl ) )
, m_lastModificationDate( lastModificationDate )
, m_size( size )
......@@ -51,7 +51,7 @@ File::File( std::string mrl, fs::IFileSystemFactory& fsFactory,
}
File::File( std::string mrl, IFileSystemFactory& fsFactory,
time_t lastModificationDate, int64_t size,
time_t lastModificationDate, uint64_t size,
IFile::LinkedFileType linkedType, std::string linkedFile )
: CommonFile( std::move( mrl ), linkedType, std::move( linkedFile ) )
, m_lastModificationDate( lastModificationDate )
......@@ -65,7 +65,7 @@ time_t File::lastModificationDate() const
return m_lastModificationDate;
}
int64_t File::size() const
uint64_t File::size() const
{
return m_size;
}
......
......@@ -38,17 +38,17 @@ class File : public CommonFile
{
public:
File( std::string mrl, IFileSystemFactory& fsFactory,
time_t lastModificationDate, int64_t size );
time_t lastModificationDate, uint64_t size );
File( std::string mrl, IFileSystemFactory& fsFactory,
time_t lastModificationDate, int64_t size,
time_t lastModificationDate, uint64_t size,
IFile::LinkedFileType linkedType, std::string linkedFile );
virtual time_t lastModificationDate() const override;
virtual int64_t size() const override;
virtual uint64_t size() const override;
virtual bool isNetwork() const override;
private:
time_t m_lastModificationDate;
int64_t m_size;
uint64_t m_size;
bool m_isNetwork;
};
}
......
......@@ -296,7 +296,7 @@ class NoopFile : public fs::IFile
std::string m_extension;
std::string m_linkedWith;
time_t m_lastModifDate;
int64_t m_size;
uint64_t m_size;
public:
NoopFile( const std::string& file )
......@@ -345,7 +345,7 @@ public:
return false;
}
virtual int64_t size() const
virtual uint64_t size() const
{
return m_size;
}
......@@ -365,7 +365,7 @@ public:
m_lastModifDate = date;
}
void setSize( unsigned int size )
void setSize( uint64_t size )
{
m_size = size;
}
......
......@@ -79,7 +79,7 @@ time_t File::lastModificationDate() const
return m_lastModification;
}
int64_t File::size() const
uint64_t File::size() const
{
return 0;
}
......
......@@ -40,7 +40,7 @@ public:
virtual const std::string& name() const override;
virtual const std::string& extension() const override;
virtual time_t lastModificationDate() const override;
virtual int64_t size() const override;
virtual uint64_t size() const override;
void markAsModified();
virtual const std::string& mrl() const override;
virtual bool isNetwork() const override;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment