title: Live refreshing filenames list
body: <p>
  What is the proper way of live updating the file list while keeping the tensorflow session is open?</p>
  
  <p>I am aware of the word <code>once</code> in the <code>tf.train.match_filenames_once()</code> function name but could not find an alternative. Here is a snippet showing what I am trying to do:</p>
  
  <pre class="lang-py prettyprint-override"><code>import tensorflow as tf
  
  pattern = '/tmp/test_file_*'
  filenames = tf.train.match_filenames_once(pattern)
  
  # Create some files
  for i in range(3):
      with open(f'/tmp/test_file_old_{i}', 'w'):
          pass
  
  # Open session and initialize vars
  init_op = tf.local_variables_initializer()
  sess = tf.Session()
  sess.run(init_op)
  
  # Read filenames list before adding new files
  filenames_result_1 = sess.run(filenames)
  print('First filenames list:')
  print(filenames_result_1)
  
  # Create some new files
  for i in range(3):
      with open(f'/tmp/test_file_new_{i}', 'w'):
          pass
  
  # Read filenames list after adding new files
  filenames_result_2 = sess.run(filenames)
  print('Second filenames list:')
  print(filenames_result_2)
  
  # Trying to reinitialize the contents
  sess.run(init_op)
  filenames_result_3 = sess.run(filenames)
  print('Third filenames list:')
  print(filenames_result_3)
  </code></pre>
  
  <p>Output:</p>
  
  <pre class="lang-py prettyprint-override"><code>First filenames list:
  [b'/tmp/test_file_old_1' b'/tmp/test_file_old_0' b'/tmp/test_file_old_2']
  Second filenames list:
  [b'/tmp/test_file_old_1' b'/tmp/test_file_old_0' b'/tmp/test_file_old_2']
  Third filenames list:
  [b'/tmp/test_file_old_1' b'/tmp/test_file_old_0' b'/tmp/test_file_old_2']
  </code></pre>
  
  <p>I would have liked to obtain the up-to-date list of files instead.</p>