class_docstr: OSS Filesystem Tests
docstr: Test file operations
docstr_tok: ["Test","file","operations"]
code: def test_file_operations(self):
      """Test file operations"""
  
      f = get_oss_path("test_file_operations")
      self.assertFalse(gfile.Exists(f))
  
      fh = gfile.Open(f, mode="w")
      content = "file content"
      fh.write(content)
      fh.close()
      self.assertTrue(gfile.Exists(f))
  
      fh = gfile.Open(f)
      self.assertEqual(fh.read(), content)
  
      self.assertEqual(gfile.Stat(f).length, len(content))
  
      f2 = get_oss_path("test_file_2")
      gfile.Rename(f, f2)
      self.assertFalse(gfile.Exists(f))
      self.assertTrue(gfile.Exists(f2))
  
      f3 = get_oss_path("test_file_3")
      gfile.Copy(f2, f3, overwrite=True)
      self.assertTrue(gfile.Exists(f3))
  
imports: import os
  import unittest
  from tensorflow.python.framework import errors
  from tensorflow.python.lib.io import file_io
  from tensorflow.python.platform import test
  from tensorflow.python.platform import gfile
  import tensorflow
  import tensorflow_io
label_desc: Use image node_id 5 for calling the OSSFSTest obj's underlying member method code with example usage: obj.test_file_operations() without return types