def _create(filesystem, content_type=RAW, filename=None, params=None):
 if (not filesystem):
  raise InvalidArgumentError('Filesystem is empty')
 if (not isinstance(filesystem, basestring)):
  raise InvalidArgumentError('Filesystem should be a string')
 if (content_type != RAW):
  raise InvalidArgumentError('Invalid content type')
 request = file_service_pb.CreateRequest()
 response = file_service_pb.CreateResponse()
 request.set_filesystem(filesystem)
 request.set_content_type(content_type)
 if filename:
  if (not isinstance(filename, basestring)):
   raise InvalidArgumentError('Filename should be a string')
  request.set_filename(filename)
 if params:
  if (not isinstance(params, dict)):
   raise InvalidArgumentError('Parameters should be a dictionary')
  for (k, v) in params.items():
   param = request.add_parameters()
   param.set_name(k)
   param.set_value(v)
 _make_call('Create', request, response)
 return response.filename()

def _create ( filesystem , content_type = RAW , filename = None , params = None ) : if ( not filesystem ) : raise InvalidArgumentError ( 'Filesystem is empty' ) if ( not isinstance ( filesystem , basestring ) ) : raise InvalidArgumentError ( 'Filesystem should be a string' ) if ( content_type != RAW ) : raise InvalidArgumentError ( 'Invalid content type' ) request = file_service_pb . CreateRequest ( ) response = file_service_pb . CreateResponse ( ) request . set_filesystem ( filesystem ) request . set_content_type ( content_type ) if filename : if ( not isinstance ( filename , basestring ) ) : raise InvalidArgumentError ( 'Filename should be a string' ) request . set_filename ( filename ) if params : if ( not isinstance ( params , dict ) ) : raise InvalidArgumentError ( 'Parameters should be a dictionary' ) for ( k , v ) in params . items ( ) : param = request . add_parameters ( ) param . set_name ( k ) param . set_value ( v ) _make_call ( 'Create' , request , response ) return response . filename ( )
create a file .