HEX
Server: Apache
System: Linux sg241.singhost.net 2.6.32-896.16.1.lve1.4.51.el6.x86_64 #1 SMP Wed Jan 17 13:19:23 EST 2018 x86_64
User: honghock (909)
PHP: 8.0.30
Disabled: passthru,system,shell_exec,show_source,exec,popen,proc_open
Upload Files
File: //usr/lib64/python2.6/site-packages/jinja2/_ipysupport.py
# -*- coding: utf-8 -*-
"""
    jinja2._ipysupport
    ~~~~~~~~~~~~~~~~~~

    IronPython support library.  This library exports functionality from
    the CLR to Python that is normally available in the standard library.

    :copyright: (c) 2009 by the Jinja Team.
    :license: BSD.
"""
from System import DateTime
from System.IO import Path, File, FileInfo


epoch = DateTime(1970, 1, 1)


class _PathModule(object):
    """A minimal path module."""

    sep = str(Path.DirectorySeparatorChar)
    altsep = str(Path.AltDirectorySeparatorChar)
    pardir = '..'

    def join(self, path, *args):
        args = list(args[::-1])
        while args:
            path = Path.Combine(path, args.pop())
        return path

    def isfile(self, filename):
        return File.Exists(filename)

    def getmtime(self, filename):
        info = FileInfo(filename)
        return int((info.LastAccessTimeUtc - epoch).TotalSeconds)


path = _PathModule()