giga::core::FolderNode Class Referencefinal
Inheritance diagram for giga::core::FolderNode:
Public Member Functions | |
FolderNode (FolderNode &&)=default | |
FolderNode & | operator= (FolderNode &&)=default |
FolderNode & | operator= (const FolderNode &) |
FolderNode (const FolderNode &other) | |
FolderNode (std::shared_ptr< data::Node > n, const Application &app) | |
virtual const std::vector < std::unique_ptr< Node > > & | getChildren () const override |
Load the children node if needed then return them. The children nodes are stored in a local cache variable. More... | |
virtual FolderNode & | addChildFolder (const utility::string_t &name) override |
Create a new FolderNode and add it to the children list. More... | |
virtual FolderNode | createChildFolder (const utility::string_t &name) const override |
Create a new FolderNode (Do not add it to the local children list) More... | |
virtual UploadingFile | uploadFile (const boost::filesystem::path &filepath, pplx::cancellation_token_source cts=pplx::cancellation_token_source{}) override |
Upload a file into this FolderNode. More... | |
virtual FileDownloader | download (const utility::string_t &destinationPath, FileDownloader::Policy policy=FileDownloader::Policy::ignore) override |
Download a FileNode. More... | |
virtual const FileNodeData & | fileData () const override |
Get the data associated with a FileNode. More... | |
Public Member Functions inherited from giga::core::Node | |
Node (Node &&)=default | |
Node & | operator= (Node &&)=default |
Node (const Node &rhs) | |
Node & | operator= (const Node &rhs) |
const std::string & | id () const |
Type | type () const |
const utility::string_t & | name () const |
const std::string & | parentId () const |
const std::vector< std::string > & | ancestors () const |
uint64_t | ownerId () const |
std::chrono::system_clock::time_point | creationDate () const |
std::chrono::system_clock::time_point | lastUpdateDate () const |
uint64_t | nbChildren () const |
uint64_t | nbFiles () const |
uint64_t | size () const |
void | remove () |
Remove this node. Set its id to "" More... | |
const utility::string_t & | rename (const utility::string_t &name) |
Rename this node. More... | |
std::unique_ptr< core::Node > | copyTo (const FolderNode &node, MergePolicy policy=MergePolicy::renameSource) const |
Shortcut for copyOrMoveTo(const FolderNode&, false, MergePolicy) | |
std::unique_ptr< core::Node > | moveTo (const FolderNode &node, MergePolicy policy=MergePolicy::renameSource) const |
Shortcut for copyOrMoveTo(const FolderNode&, bool, MergePolicy) | |
std::unique_ptr< core::Node > | copyOrMoveTo (const FolderNode &node, bool isMove, MergePolicy policy=MergePolicy::renameSource) const |
Copy or move a node. More... | |
const std::shared_ptr< data::Node > | handle () const |
Additional Inherited Members | |
Public Types inherited from giga::core::Node | |
enum | Type { root = 0, folder, file } |
enum | MediaType { audio = 0, document, video, image, unknown, folder } |
enum | MergePolicy { override = 0, ignore, renameSource, renameDest } |
typedef std::unique_ptr < std::pair< std::unique_ptr < Sha1Calculator >, pplx::task < std::shared_ptr < FileUploader > > > > | UploadingFile |
Static Public Member Functions inherited from giga::core::Node | |
static std::unique_ptr< Node > | create (std::shared_ptr< data::Node > n, const Application &app) |
static std::unique_ptr< Node > | create (const Node &node) |
Static Public Attributes inherited from giga::core::Node | |
static const utils::EnumConvertor < core::Node::Type, 3 > | typeCvrt |
static const utils::EnumConvertor < MediaType, 6 > | mediaTypeCvrt |
static const utils::EnumConvertor < MergePolicy, 4 > | mergePolicyCvrt |
Protected Member Functions inherited from giga::core::Node | |
Node (std::shared_ptr< data::Node > n, const Application &app) | |
Protected Attributes inherited from giga::core::Node | |
std::shared_ptr< data::Node > | _data |
const Application * | _app |
Member Function Documentation
|
overridevirtual |
Create a new FolderNode and add it to the children list.
- Returns
- The new FolderNode
- Exceptions
-
HttpError
Implements giga::core::Node.
|
overridevirtual |
Create a new FolderNode (Do not add it to the local children list)
- Returns
- The new FolderNode
- Exceptions
-
HttpError
Implements giga::core::Node.
|
overridevirtual |
Download a FileNode.
- Parameters
-
destinationPath a path to a folder where the FileNode will be downloaded policy what to do if the file already exists at destinationPath
- Returns
- A FileDownloader to control the download.
- Exceptions
-
ErrorException if this node is a FolderNode
- See Also
- Downloader to download folders.
Implements giga::core::Node.
|
overridevirtual |
Get the data associated with a FileNode.
- Exceptions
-
ErrorException if this node is a FolderNode
Implements giga::core::Node.
|
overridevirtual |
Load the children node if needed then return them. The children nodes are stored in a local cache variable.
- Returns
- The list of children nodes
- Exceptions
-
HttpError
Implements giga::core::Node.
|
overridevirtual |
Upload a file into this FolderNode.
- Parameters
-
filepath the path to the file to upload
- Returns
- A FileUploader object to control the upload.
- Exceptions
-
ErrorException if this node is a FileNode.
- See Also
- Uploader to upload folders.
Implements giga::core::Node.
The documentation for this class was generated from the following files:
- /home/thomas/code/GiGaSdk/src/giga/core/FolderNode.h
- /home/thomas/code/GiGaSdk/src/giga/core/FolderNode.cpp