Add WritableFile::Tell, make tf.GFile.tell call it.
Currently, tf.GFile.tell fails if the file was opened for writing. This is undesirable behavior. This change adds WritableFile::Tell and has tf.GFile.tell delegate to that in the case of a writable file. The Tell method returns the write position in the given writable file. This method is intended to function like the POSIX ftell method, but any WritableFile implementation may choose to return errors::Unimplemented (the default behavior). Implementations are provided for posix, HDFS, gzip, GCS and some others. PiperOrigin-RevId: 226056765
Loading
Please sign in to comment