Compute a prefix for a to-be-installed file.

@param timestamp the timestamp on which to base the prefix.
@return a file prefix that represents the timestamp in its name.
347430
private static String prefixForTimestamp(DateTime timestamp) {
        return String.format("monsoon-%04d%02d%02d-%02d%02d", timestamp.getYear(), timestamp.getMonthOfYear(), timestamp.getDayOfMonth(), timestamp.getHourOfDay(), timestamp.getMinuteOfHour());
    }
1228036
private String getPacketHeader(final long timeStamp) {
      if (header) {
        StringBuffer buf = new StringBuffer(dateFormat.format(new Date(timeStamp)));
        //  RFC 3164 says leading space, not leading zero on days 1-9
        if (buf.charAt(4) == '0') {
          buf.setCharAt(4, ' ');
        }
        buf.append(getLocalHostname());
        buf.append(' ');
        return buf.toString();
      }
      return "";
  }
1318395
@Override
    public String doGetNamespaceURI(String prefix)
    {
        // Note: base class checks for 'known' problems and prefixes:
        if (mNsByPrefix == null) {
            mNsByPrefix = buildByPrefixMap();
        }
        Namespace ns = mNsByPrefix.get(prefix);
        if (ns == null && mParentCtxt != null) {
            return mParentCtxt.getNamespaceURI(prefix);
        }
        return (ns == null) ? null : ns.getNamespaceURI();
    }
88341
@Override
    public String getNewTicketId(final String prefix) {
        val artifact = getSAMLArtifactType();
        return prefix + '-' + artifact.base64Encode();
    }
1191244
private Map<URI, URI> addFilePrefix(final Map<URI, URI> set) {
        final Map<URI, URI> newSet = new HashMap<>();
        for (final Map.Entry<URI, URI> file: set.entrySet()) {
            final URI key = tempFileNameScheme.generateTempFileName(file.getKey());
            final URI value = tempFileNameScheme.generateTempFileName(file.getValue());
            newSet.put(key, value);
        }
        return newSet;
    }
1011139
public static RandomAccessFile createTemporaryFile
        (String prefix, String suffix, File directory) throws IOException {

        File file = File.createTempFile(prefix, suffix, directory);
        file.deleteOnExit();
        return new TemporaryFile(file);
    }
611741
function (method, prefix, content) {
    return (
      /* The alias method implementation. */
      function () {
        if (prefix !== null) {
          P_ARRAY.unshift.call(arguments, prefix);
        }
        if (api.logTimestamps && content === null) {
          P_ARRAY.unshift.call(arguments, dateToIsoString(new Date()) + " ");
        }
        return (
          api[method].apply(api, content !== null ? [ content ] : arguments)
        );
      }
    );
  }
1053082
@Override
    public LogRepositoryBrowser findByMillis(long timestamp) {
        File[] files = listFiles(instanceFilter);
        if (files == null) {
            return null;
        }

        File result = null;
        long max = Long.MIN_VALUE;
        for (File file : files) {
            long time = parseTimeStamp(file.getName());
            // Select file with a maximum time stamp which is smaller than 'timestamp'.
            if (max < time && (timestamp < 0 || time <= timestamp)) {
                max = time;
                result = file;
            }
        }

        // If all files has timestamp bigger than 'timestamp' return null.
        if (result == null) {
            return null;
        } else {
            return new LogRepositoryBrowserImpl(result, new String[] { result.getName() });
        }
    }
1249509
public static String padEndDateStr(String timestamp) {
		return boundTimestamp(padDigits(timestamp,LOWER_TIMESTAMP_LIMIT,
				UPPER_TIMESTAMP_LIMIT,UPPER_TIMESTAMP_LIMIT));
	}
87841
@Override
  public String generateFileName(int logLevel, long timestamp) {
    SimpleDateFormat sdf = mLocalDateFormat.get();
    sdf.setTimeZone(TimeZone.getDefault());
    return sdf.format(new Date(timestamp));
  }
228375
def backup_name(self, timestamp=None):
        
        suffix = datetime2string(coalesce(timestamp, datetime.now()), "%Y%m%d_%H%M%S")
        return File.add_suffix(self._filename, suffix)
724293
private void loadTimestampFile() {
        File timestampFile = new File(testSrcDir, timestampFileName);
        if (timestampFile.exists()) {
            try {
                timestampLog.loadFromXML(FileUtils.openInputStream(timestampFile));
            } catch (IOException e) {
                log.warn("timestamp.load.error", e);
            }
        }
    }
745167
@Deprecated
    public static File createTempDirectory( final String    prefix )
        throws
            IOException
    {
        File tempDir;

        tempDir = File.createTempFile( prefix, null );

        if( ! ( tempDir.delete() ) )
        {
            throw new IOException( "Could not delete temp file: " + tempDir.getAbsolutePath() );
        }

        if( ! ( tempDir.mkdir() ) )
        {
            throw new IOException( "Could not create temp directory: " + tempDir.getAbsolutePath() );
        }

        return tempDir;
    }
503974
static String date(final long timestamp) {
    if ((timestamp & Const.SECOND_MASK) != 0) {
      return new Date(timestamp).toString();
    } else {
      return new Date(timestamp * 1000).toString();
    }
  }
66982
private int getTimeSlice(Instant timestamp) {
        long value = times.getTime(timestamp) / TIMESLICE_INTERVAL;
        if (value>Integer.MAX_VALUE || value<0) throw new IllegalArgumentException("Timestamp overflow detected: " + timestamp);
        return (int)value;
    }
727799
private File createTemporaryFile(String filename) throws HelloSignException {
        String prefix = filename.substring(0, filename.indexOf("."));
        String postfix = filename.substring(filename.indexOf(".") + 1, filename.length());
        if (prefix == null || postfix == null) {
            throw new HelloSignException("Invalid file name: " + prefix + "." + postfix);
        }
        File f = null;
        try {
            f = File.createTempFile(prefix, "." + postfix);
        } catch (Exception ex) {
            throw new HelloSignException(ex);
        }
        return f;
    }
7275
def remove_tmp_prefix_from_file_path(file_path):
    
    path, filename = os.path.split(file_path)
    return os.path.join(path, remove_tmp_prefix_from_filename(filename)).replace('\\', '/')