MOON
Server: Apache
System: Linux server1.studioinfinity.com.br 2.6.32-954.3.5.lve1.4.90.el6.x86_64 #1 SMP Tue Feb 21 12:26:30 UTC 2023 x86_64
User: artinside (517)
PHP: 7.4.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //proc/self/root/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()