Class: NVX::SDS::FSFolderAttributes
- Inherits:
-
Object
- Object
- NVX::SDS::FSFolderAttributes
- Defined in:
- lib/nvx/sds/APIClasses/fsfolderattributes.rb
Overview
FSFolderAttributes is an internal class used to extract folder information from a ListFolders call.
Instance Method Summary collapse
-
#created_date ⇒ Object
The date created.
-
#EmptyRootFolder(name, path, created_date) ⇒ Object
Creates the Base root folder, used internally for ListFolders call.
-
#file_count ⇒ Object
the children file count.
-
#folder_count ⇒ Object
The children folder count.
-
#initialize(xml) ⇒ FSFolderAttributes
constructor
Extract the folder information from the xml fragment.
-
#name ⇒ Object
The name of the folder.
-
#path ⇒ Object
The path to the folder.
Constructor Details
#initialize(xml) ⇒ FSFolderAttributes
Extract the folder information from the xml fragment.
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/nvx/sds/APIClasses/fsfolderattributes.rb', line 9 def initialize(xml) if !xml.nil? doc = REXML::Document.new(xml) @name = (text = doc.root.elements["//Folder/Name"].get_text and text.value) @path = (text = doc.root.elements["//Folder/Path"].get_text and text.value) @created_date = (text = doc.root.elements["//Folder/CreatedDate"].get_text and text.value) @folder_count = (text = doc.root.elements["//Folder/FolderCount"].get_text and text.value) @file_count = (text = doc.root.elements["//Folder/FileCount"].get_text and text.value) end end |
Instance Method Details
#created_date ⇒ Object
The date created.
38 39 40 |
# File 'lib/nvx/sds/APIClasses/fsfolderattributes.rb', line 38 def created_date @created_date.nil? ? "" : @created_date end |
#EmptyRootFolder(name, path, created_date) ⇒ Object
Creates the Base root folder, used internally for ListFolders call.
21 22 23 24 25 |
# File 'lib/nvx/sds/APIClasses/fsfolderattributes.rb', line 21 def EmptyRootFolder(name, path, created_date) @name = name @path = path @created_date = created_date end |
#file_count ⇒ Object
the children file count
48 49 50 |
# File 'lib/nvx/sds/APIClasses/fsfolderattributes.rb', line 48 def file_count @file_count end |
#folder_count ⇒ Object
The children folder count.
43 44 45 |
# File 'lib/nvx/sds/APIClasses/fsfolderattributes.rb', line 43 def folder_count @folder_count end |
#name ⇒ Object
The name of the folder
28 29 30 |
# File 'lib/nvx/sds/APIClasses/fsfolderattributes.rb', line 28 def name @name end |
#path ⇒ Object
The path to the folder.
33 34 35 |
# File 'lib/nvx/sds/APIClasses/fsfolderattributes.rb', line 33 def path @path end |