Foxit PDF SDK
FSPortfolioFolderNode Class Reference
Inheritance diagram for FSPortfolioFolderNode:
FSPortfolioNode FSBase

Instance Methods

(FSPortfolioFileNode *) - addFile:
 Add a file (specified by file path) to be a sub node.
More...
 
(FSPortfolioFileNode *) - addFileWithStreamCallback:file_name:
 Add a file (specified with FSFileStreamCallback) to be a sub node.
More...
 
(FSPortfolioFileNode *) - addPDFDoc:file_name:
 Add an loaded PDF document to be a sub node.
More...
 
(FSPortfolioFolderNode *) - addSubFolder:
 Add a new sub folder.
More...
 
(FSDateTime *) - getCreationDateTime
 Get the creation date time.
More...
 
(FSDateTime *) - getModifiedDateTime
 Get the last modified date time.
More...
 
(NSString *) - getName
 Get name of current folder node.
More...
 
(FSPortfolioNodeArray *) - getSortedSubNodes
 Get sub nodes array, which has been sorted according to sorting order and specified field name defined in class FSPortfolio .
More...
 
(id) - initWithOther:
 Constructor, with parent class object.
More...
 
(BOOL) - isRoot
 Check if current folder node represents root node.
More...
 
(void) - removeSubNode:
 Remove a sub node.
More...
 
- Instance Methods inherited from FSPortfolioNode
(FSPortfolioNodeType- getNodeType
 Get node type.
More...
 
(BOOL) - isEmpty
 Check whether current object is empty or not.
More...
 

Properties

NSString * description
 Get or Set description.

 

Detailed Description

Portfolio folder node is used as a folder, which can contain file and other folder as sub nodes.
Class FSPortfolioFolderNode is derived from class FSPortfolioNode . It offers function to access a folder node: add file/folder to folder node, remove sub node from folder node, get all the sub nodes in sorted order, and get/set some properties of folder node.

Method Documentation

◆ addFile:()

- (FSPortfolioFileNode *) addFile: (NSString *)  file_path

Add a file (specified by file path) to be a sub node.

Foxit PDF SDK will retrieve some properties (such as file name, modified date and etc.) from input file path and set them to the file specification object of returned file node. User can also update properties by functions in class FSFileSpec for the returned file node.

Parameters
[in]file_pathA full path of an existing local file.
Returns
Newly added file node object.

◆ addFileWithStreamCallback:file_name:()

- (FSPortfolioFileNode *) addFileWithStreamCallback: (id<FSFileStreamCallback>)  file_stream
file_name: (NSString *)  file_name 

Add a file (specified with FSFileStreamCallback) to be a sub node.

Foxit PDF SDK CANNOT retrieve any property from input stream callback. So user should update properties by functions in class FSFileSpec for returned file node.

Parameters
[in]file_streamA FSFileStreamCallback object which is implemented by user to read the file content.
[in]file_nameFile name for the file specified by stream callback. This name will be used in file specification which is related with the returned file node object.
Returns
Newly added file node object.

◆ addPDFDoc:file_name:()

- (FSPortfolioFileNode *) addPDFDoc: (FSPDFDoc*)  pdf_doc
file_name: (NSString *)  file_name 

Add an loaded PDF document to be a sub node.

Foxit PDF SDK will try to retrieve properties (such as creation date and modified date) from input PDF document's metadata and set them to the file specification object of returned file node. User can also update properties by functions in class FSFileSpec for the returned file node.

Parameters
[in]pdf_docA valid PDF document object which has been loaded successsfully.
[in]file_nameFile name for the file specified by stream callback. This name will be used in file specification which is related with the returned file node object.
Returns
Newly added file node object.

◆ addSubFolder:()

- (FSPortfolioFolderNode *) addSubFolder: (NSString *)  folder_name

Add a new sub folder.

Parameters
[in]folder_nameFolder name for the new sub folder.
Returns
Newly added folder node object.

◆ getCreationDateTime()

- (FSDateTime *) getCreationDateTime

Get the creation date time.

Returns
Creation date time.

◆ getModifiedDateTime()

- (FSDateTime *) getModifiedDateTime

Get the last modified date time.

If structure of sub nodes is changed (such as add file/folder, remove sub node), Foxit PDF SDK will update last modified date time of current folder node automatically.

Returns
Last modified date time.

◆ getName()

- (NSString *) getName

Get name of current folder node.

Returns
Name of current folder node. If current folder node is the root node, usually it does not have a name and an empty string will be return for this case.

◆ getSortedSubNodes()

- (FSPortfolioNodeArray *) getSortedSubNodes

Get sub nodes array, which has been sorted according to sorting order and specified field name defined in class FSPortfolio .

If the type of values (which are to be compared) is string, Foxit PDF SDK will compare these string values without taking care of whether a character is a capital or a small letter.

Returns
An array of sorted sub nodes.

◆ initWithOther:()

- (id) initWithOther: (FSPortfolioNode*)  other

Constructor, with parent class object.

Parameters
[in]otherParent class object.

Reimplemented from FSPortfolioNode.

◆ isRoot()

- (BOOL) isRoot

Check if current folder node represents root node.

Returns
YES means current folder node is the root node, while NO means current folder node is not the root node.

◆ removeSubNode:()

- (void) removeSubNode: (FSPortfolioNode*)  sub_node

Remove a sub node.

Parameters
[in]sub_nodeA node object which represents a sub node of current node to be removed.
Returns
None.