code: public static File getRecordFile(IScope scope, String name) {
          // get stream filename generator
          IStreamFilenameGenerator generator = (IStreamFilenameGenerator) ScopeUtils.getScopeService(scope, IStreamFilenameGenerator.class, DefaultStreamFilenameGenerator.class);
          // generate filename
          String fileName = generator.generateFilename(scope, name, ".flv", GenerationType.RECORD);
          File file = null;
          if (generator.resolvesToAbsolutePath()) {
              file = new File(fileName);
          } else {
              Resource resource = scope.getContext().getResource(fileName);
              if (resource.exists()) {
                  try {
                      file = resource.getFile();
                      log.debug("File exists: {} writable: {}", file.exists(), file.canWrite());
                  } catch (IOException ioe) {
                      log.error("File error: {}", ioe);
                  }
              } else {
                  String appScopeName = ScopeUtils.findApplication(scope).getName();
                  file = new File(String.format("%s/webapps/%s/%s", System.getProperty("red5.root"), appScopeName, fileName));
              }
          }
          return file;
      }
docs: Get the file we'd be recording to based on scope and given name.
  
  @param scope
  scope
  @param name
  name
  @return file