mirror of
https://onedev.site.tesses.net/tesses-framework
synced 2026-02-08 15:55:46 +00:00
Make streams and vfs and http shared_ptr
This commit is contained in:
@@ -8,6 +8,20 @@
|
||||
|
||||
namespace Tesses::Framework::Filesystem
|
||||
{
|
||||
class StatVFSData {
|
||||
public:
|
||||
uint64_t BlockSize;
|
||||
uint64_t FragmentSize;
|
||||
uint64_t Blocks;
|
||||
uint64_t BlocksFree;
|
||||
uint64_t BlocksAvailable;
|
||||
uint64_t TotalInodes;
|
||||
uint64_t FreeInodes;
|
||||
uint64_t AvailableInodes;
|
||||
uint64_t Id;
|
||||
uint64_t Flags;
|
||||
uint64_t MaxNameLength;
|
||||
};
|
||||
class VFSPath {
|
||||
public:
|
||||
static VFSPath CurrentDirectoryAsRelative();
|
||||
@@ -107,7 +121,7 @@ namespace Tesses::Framework::Filesystem
|
||||
class VFS {
|
||||
public:
|
||||
|
||||
virtual Tesses::Framework::Streams::Stream* OpenFile(VFSPath path, std::string mode)=0;
|
||||
virtual std::shared_ptr<Tesses::Framework::Streams::Stream> OpenFile(VFSPath path, std::string mode)=0;
|
||||
virtual void CreateDirectory(VFSPath path)=0;
|
||||
virtual void DeleteDirectory(VFSPath path)=0;
|
||||
virtual bool RegularFileExists(VFSPath path)=0;
|
||||
@@ -134,6 +148,10 @@ namespace Tesses::Framework::Filesystem
|
||||
virtual void GetDate(VFSPath path, Date::DateTime& lastWrite, Date::DateTime& lastAccess);
|
||||
virtual void SetDate(VFSPath path, Date::DateTime lastWrite, Date::DateTime lastAccess);
|
||||
|
||||
virtual bool StatVFS(VFSPath path, StatVFSData& data);
|
||||
|
||||
virtual void Chmod(VFSPath path, uint32_t mode);
|
||||
|
||||
virtual ~VFS();
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user