commonlib/src/main/java/com/streamsets/pipeline/lib/io/GlobFileContextProvider.java
@Override
  public void setOffsets(Map<String, String> offsets) throws IOException {
    Utils.checkNotNull(offsets, "offsets");
    LOG.trace("setOffsets()");

    // We look for created directory paths here
    findCreatedDirectories();

    // we look for new files only here
    findNewFileContexts();

    // we purge file only here
    purge();

    super.setOffsets(offsets);

    startNewLoop();
  }
@Override
  public void setOffsets(Map<String, String> offsets) throws IOException {
    Utils.checkNotNull(offsets, "offsets");
    LOG.trace("setOffsets()");

    // We look for created directory paths here
    findCreatedDirectories();

    // we look for new files only here
    findNewFileContexts();

    // we purge file only here
    purge();

    super.setOffsets(offsets);

    startNewLoop();
  }
Sets the file offsets to use for the next read. To work correctly, the last return offsets should be used or
an empty <code>Map</code> if there is none.
<p/>
If a reader is already live, the corresponding set offset is ignored as we cache all the contextual information
of live readers.

@param offsets directory offsets.
@throws java.io.IOException thrown if there was an IO error while preparing file offsets.