Create and delete
This commit is contained in:
@@ -42,6 +42,7 @@ public:
|
||||
FilePath& MakeAbsolute();
|
||||
FilePath& SkipRoot();
|
||||
FilePath& StripToFileName();
|
||||
bool CreateEmptyFile();
|
||||
|
||||
public:
|
||||
FilePath& operator=(const FilePath& filePath);
|
||||
|
@@ -7,6 +7,7 @@
|
||||
#include <deque>
|
||||
#include <siacurl.h>
|
||||
#include <eventsystem.h>
|
||||
#include <filepath.h>
|
||||
|
||||
NS_BEGIN(Sia)
|
||||
NS_BEGIN(Api)
|
||||
@@ -21,7 +22,6 @@ public:
|
||||
Queued,
|
||||
Modified,
|
||||
Uploading,
|
||||
Remove,
|
||||
Complete,
|
||||
Error
|
||||
};
|
||||
@@ -57,8 +57,8 @@ private:
|
||||
private:
|
||||
void HandleFileRemove(const CSiaCurl& siaCurl, const SString& siaPath, const SString& siaDriveFilePath);
|
||||
bool CreateSiaDriveFile(const SString& siaPath, const SString& filePath, const SString& tempSourcePath, const SString& siaDriveFilePath);
|
||||
void UpdateFileQueueOnStartup();
|
||||
void DeleteFilesRemovedFromSia(const CSiaCurl& siaCurl, CSiaDriveConfig* siaDriveConfig, const bool& isStartup = false);
|
||||
void RemoveFileFromSia(const CSiaCurl& siaCurl, const SString& siaPath, FilePath removeFilePath);
|
||||
|
||||
protected:
|
||||
virtual void AutoThreadCallback(const CSiaCurl& siaCurl, CSiaDriveConfig* siaDriveConfig) override;
|
||||
@@ -746,36 +746,6 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
class FileRemoveAdded :
|
||||
public CEvent
|
||||
{
|
||||
public:
|
||||
FileRemoveAdded(const SString& siaPath) :
|
||||
_siaPath(siaPath)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public:
|
||||
virtual ~FileRemoveAdded()
|
||||
{
|
||||
}
|
||||
|
||||
private:
|
||||
const SString _siaPath;
|
||||
|
||||
public:
|
||||
virtual SString GetSingleLineMessage() const override
|
||||
{
|
||||
return L"FileRemoveAdded|SP|" + _siaPath;
|
||||
}
|
||||
|
||||
virtual std::shared_ptr<CEvent> Clone() const override
|
||||
{
|
||||
return std::shared_ptr<CEvent>(new FileRemoveAdded(_siaPath));
|
||||
}
|
||||
};
|
||||
|
||||
class SourceFileNotFound :
|
||||
public CEvent
|
||||
{
|
||||
|
Reference in New Issue
Block a user