parameters: (disk_name)
docstring: Checks if given disk is actually a ssd disk.
  
      :param disk_name:
      :return:
docstring_summary: Checks if given disk is actually a ssd disk.
docstring_tokens: Checks if given disk is actually a ssd disk .
function: def is_ssd_disk(disk_name):
      """ Checks if given disk is actually a ssd disk.
  
      :param disk_name:
      :return:
      """
      filename = os.path.join("/sys/block", disk_name, "queue/rotational")
  
      if not os.path.exists(filename):
          # Should not happen unless sysfs changes, but better safe than sorry
          return False
  
      with open(filename) as sysfile:
          return sysfile.read() == "0\n"
function_tokens: def is_ssd_disk ( disk_name ) : filename = os . path . join ( "/sys/block" , disk_name , "queue/rotational" ) if not os . path . exists ( filename ) : # Should not happen unless sysfs changes, but better safe than sorry return False with open ( filename ) as sysfile : return sysfile . read ( ) == "0\n"