parameters: (self, file_name)
docstring: Checks whether the given file (or directory) is writable on the device.
  
      Args:
        file_name: Full path of file/directory to check.
  
      Returns:
        True if writable, False otherwise.
docstring_summary: Checks whether the given file (or directory) is writable on the device.
docstring_tokens: Checks whether the given file ( or directory ) is writable on the device .
function: def IsFileWritableOnDevice(self, file_name):
      """Checks whether the given file (or directory) is writable on the device.
  
      Args:
        file_name: Full path of file/directory to check.
  
      Returns:
        True if writable, False otherwise.
      """
      assert '"' not in file_name, 'file_name cannot contain double quotes'
      try:
        status = self._adb.SendShellCommand(
            '\'test -w "%s"; echo $?\'' % (file_name))
        if 'test: not found' not in status:
          return int(status) == 0
        raise errors.AbortError('"test" binary not found. OS too old.')
  
      except ValueError:
        if IsDeviceAttached(self._device):
          raise errors.DeviceUnresponsiveError('Device may be offline.')
  
        return False
function_tokens: def IsFileWritableOnDevice ( self , file_name ) : assert '"' not in file_name , 'file_name cannot contain double quotes' try : status = self . _adb . SendShellCommand ( '\'test -w "%s"; echo $?\'' % ( file_name ) ) if 'test: not found' not in status : return int ( status ) == 0 raise errors . AbortError ( '"test" binary not found. OS too old.' ) except ValueError : if IsDeviceAttached ( self . _device ) : raise errors . DeviceUnresponsiveError ( 'Device may be offline.' ) return False