Method: CDK::FSELECT#createList

Defined in:
lib/cdk/components/fselect.rb

#createList(list, list_size) ⇒ Object



895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
# File 'lib/cdk/components/fselect.rb', line 895

def createList(list, list_size)
  status = false

  if list_size >= 0
    newlist = []

    # Copy in the new information
    status = true
    (0...list_size).each do |x|
      newlist << list[x]
      if newlist[x] == 0
        status = false
        break
      end
    end

    if status
      self.destroyInfo
      @file_counter = list_size
      @dir_contents = newlist
    end
  else
    self.destroyInfo
    status = true
  end
  return status
end