All Samples(6565) | Call(6355) | Derive(0) | Import(210)
stat(path) -> stat result Perform a stat system call on the given path.
src/s/a/savonet-HEAD/washtub/wtsite/mediapool/views.py savonet(Download)
from django.utils.encoding import smart_str, smart_unicode from django.contrib.auth.decorators import login_required from wtsite.mediapool.models import * from os import access, stat, path, walk, F_OK, R_OK from os.path import join, getsize from stat import ST_MTIME import tagpy, datetime, logging
ext = path.splitext(f)[1]
if ext in ('.mp3', '.flac'):
full_path = path.join(root,f)
mod_time = stat(full_path)[ST_MTIME]
mod_time = datetime.datetime.fromtimestamp(mod_time)
try:
#check update time and compare against database.
ext = path.splitext(f)[1]
if ext in ('.mp3', '.flac'):
full_path = path.join(root,f)
mod_time = stat(full_path)[ST_MTIME]
mod_time = datetime.datetime.fromtimestamp(mod_time)
#try:
# #check update time and compare against database.
src/p/y/pyblosxom-HEAD/trunk/contrib/editfile.py pyblosxom(Download)
arguments = EDITOR.split()[1:]
EDITOR = EDITOR.split()[0]
from os import stat, path, spawnlp, utime, P_WAIT
import sys, time
if len(sys.argv) > 1:
sys.exit(1) try: filestats = stat(filename) except: print "File not found. Quitting." sys.exit(1)
src/p/y/pyblosxom-HEAD/contrib/editfile.py pyblosxom(Download)
arguments = EDITOR.split()[1:]
EDITOR = EDITOR.split()[0]
from os import stat, path, spawnlp, utime, P_WAIT
import sys, time
if len(sys.argv) > 1:
sys.exit(1) try: filestats = stat(filename) except: print "File not found. Quitting." sys.exit(1)
src/z/a/zamboni-lib-HEAD/lib/python/logilab/common/fileutils.py zamboni-lib(Download)
import mimetypes from os.path import isabs, isdir, islink, split, exists, walk, normpath, join from os.path import abspath from os import sep, mkdir, remove, listdir, stat, chmod from stat import ST_MODE, S_IWRITE from cStringIO import StringIO
ORed flags describing the desired mode. Use constants from the
`stat` module for file permission's modes
"""
mode = stat(filepath)[ST_MODE]
if not mode & desired_mode:
chmod(filepath, mode | desired_mode)
def __init__(self, filepath, mode):
self.original_mode = stat(filepath)[ST_MODE]
self.mode_changed = False
if mode in ('w', 'a', 'wb', 'ab'):
if not self.original_mode & S_IWRITE:
chmod(filepath, self.original_mode | S_IWRITE)
self.mode_changed = True
src/o/s/osg-20071223/osg/views.py osg(Download)
### ### graph visualization, depends on networkx ### from os import path, stat, makedirs, unlink, fdopen, system from tempfile import mkstemp def render_cachefile(obj, filename, callback, flush=False):
cachedir = cachedir + '%s/%s/' % (obj._meta.object_name, obj.id) subpath, basename = path.split(filename) cachedir = path.join(cachedir, subpath) try: stat(cachedir) except OSError: makedirs(cachedir) cachefile = path.join(cachedir, basename) try: exists = stat(cachefile)
src/m/e/meresco-HEAD/meresco-core/workingsets/2.22.8-TUD/version_2/merescocore/components/http/fileserver.py meresco(Download)
from rfc822 import formatdate from time import mktime, gmtime, timezone, strftime from stat import ST_MTIME, ST_SIZE from os import stat, listdir from merescocore.components.http import utils as httputils from merescocore.components.http.utils import CRLF
def file_mtime(filename):
return stat(filename)[ST_MTIME]
def file_size(filename):
return stat(filename)[ST_SIZE]
src/m/e/meresco-HEAD/meresco-core/workingsets/2.22.8-TUD/version_1/merescocore/components/http/fileserver.py meresco(Download)
from rfc822 import formatdate from time import mktime, gmtime, timezone, strftime from stat import ST_MTIME, ST_SIZE from os import stat, listdir from merescocore.components.http import utils as httputils from merescocore.components.http.utils import CRLF
def file_mtime(filename):
return stat(filename)[ST_MTIME]
def file_size(filename):
return stat(filename)[ST_SIZE]
src/m/e/meresco-HEAD/meresco-core/workingsets/2.22.8-TUD/version_0-fileserver_list_files/merescocore/components/http/fileserver.py meresco(Download)
from rfc822 import formatdate from time import mktime, gmtime, timezone, strftime from stat import ST_MTIME, ST_SIZE from os import stat, listdir from merescocore.components.http import utils as httputils from merescocore.components.http.utils import CRLF
def file_mtime(filename):
return stat(filename)[ST_MTIME]
def file_size(filename):
return stat(filename)[ST_SIZE]
src/v/e/velocikit-HEAD/trunk/src/velocikit/tools/proxify.py velocikit(Download)
from os.path import split, splitext, join, exists, abspath import codecs import inspect from os import chdir, getcwd, walk, stat, remove import tempfile from zipfile import PyZipFile import logging
pyfiles.append(pyfile)
pycfile = splitext(pyfile)[0]+".pyc"
pycfiles.append(pycfile)
statinfo = stat(pyfile)
if srcmtime == None or statinfo.st_mtime > srcmtime:
srcmtime = statinfo.st_mtime
dstmtime = None
for dstfile in [zipname]:
if exists(dstfile):
statinfo = stat(dstfile)
if dstmtime == None or statinfo.st_mtime < dstmtime:
dstmtime = statinfo.st_mtime
else:
src/v/e/velocikit-HEAD/src/velocikit/tools/proxify.py velocikit(Download)
from os.path import split, splitext, join, exists, abspath import codecs import inspect from os import chdir, getcwd, walk, stat, remove import tempfile from zipfile import PyZipFile import logging
pyfiles.append(pyfile)
pycfile = splitext(pyfile)[0]+".pyc"
pycfiles.append(pycfile)
statinfo = stat(pyfile)
if srcmtime == None or statinfo.st_mtime > srcmtime:
srcmtime = statinfo.st_mtime
dstmtime = None
for dstfile in [zipname]:
if exists(dstfile):
statinfo = stat(dstfile)
if dstmtime == None or statinfo.st_mtime < dstmtime:
dstmtime = statinfo.st_mtime
else:
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 Next