7#include "../WebDAVClient.hpp"
8#include "../utils/WebDAVReply.hpp"
9#include "WebDAVItem.hpp"
13 this->webdavClient = webdavClient;
16 this->lastModified = lastModified;
17 this->displayName = displayName;
18 this->contentType = contentType;
19 this->contentLength = contentLength.toInt();
20 this->flagIsCollection = isCollection;
23bool WebDAVItem::isCollection()
25 return this->flagIsCollection;
28bool WebDAVItem::isFile()
30 return !this->flagIsCollection;
35 return this->webdavClient->downloadFrom(this->href);
40 return this->webdavClient->uploadTo(this->href, filename, file);
45 return this->webdavClient->createDir(this->href, dirName);
50 return this->webdavClient->copy(this->href, destination);
55 return this->webdavClient->move(this->href, destination, overwrite);
60 return this->webdavClient->remove(this->href);
65 return this->webdavClient->listDir(this->href);
73 out <<
"HREF : " << this->href <<
"," <<
Qt::endl
74 <<
"CREATION_DATE : " << this->creationDate.toString() <<
"," <<
Qt::endl
75 <<
"LAST_MODIFIED : " << this->lastModified <<
"," <<
Qt::endl
76 <<
"DISPLAY_NAME : " << this->displayName <<
"," <<
Qt::endl
77 <<
"CONTENT_TYPE : " << this->contentType <<
"," <<
Qt::endl
78 <<
"CONTENT_LENGTH : " << this->contentLength <<
"," <<
Qt::endl
79 <<
"IS_COLLECTION : " << this->flagIsCollection;
91 return this->creationDate;
94QString WebDAVItem::getLastModified()
96 return this->lastModified;
99QString WebDAVItem::getDisplayName()
101 return this->displayName;
104QString WebDAVItem::getContentType()
106 return this->contentType;
109int WebDAVItem::getContentLength()
111 return this->contentLength;
Wraps the available actions for a remote item.
QDateTime fromString(QStringView string, QStringView format, QCalendar cal)
QTextStream & endl(QTextStream &stream)