Did I find the right examples for you? yes no

All Samples(1260)  |  Call(1193)  |  Derive(0)  |  Import(67)

        def S_ISDIR(mode):
    return S_IFMT(mode) == S_IFDIR
        


src/l/l/llfuse-0.40/examples/tmpfs.py   llfuse(Download)
    def unlink(self, inode_p, name):
        entry = self.lookup(inode_p, name)
 
        if stat.S_ISDIR(entry.st_mode):
            raise llfuse.FUSEError(errno.EISDIR)
    def rmdir(self, inode_p, name):
        entry = self.lookup(inode_p, name)
 
        if not stat.S_ISDIR(entry.st_mode):
            raise llfuse.FUSEError(errno.ENOTDIR)

src/c/l/clusterGIS-HEAD/examples/fabricate.py   clusterGIS(Download)
        fullname = os.path.join(path, name)
        st = os.stat(fullname)
        if stat.S_ISDIR(st.st_mode):
            if depth > 1:
                times.update(_file_times(fullname, depth-1, ignoreprefix))

src/p/y/pyobjc-HEAD/pyobjc/pyobjc-framework-FSEvents/Examples/watcher.py   pyobjc(Download)
        size += st.st_size
 
        if stat.S_ISDIR(st.st_mode) and (recursive or (full_path not in dir_items)):
            result = get_directory_size(full_path, 1)
 

src/p/y/pyobjc-framework-FSEvents-2.5.1/Examples/watcher.py   pyobjc-framework-FSEvents(Download)
        size += st.st_size
 
        if stat.S_ISDIR(st.st_mode) and (recursive or (full_path not in dir_items)):
            result = get_directory_size(full_path, 1)
 

src/h/o/hortonworks-sandbox-HEAD/desktop/core/ext-py/Twisted/twisted/conch/ls.py   hortonworks-sandbox(Download)
def lsLine(name, s):
    mode = s.st_mode
    perms = array.array('c', '-'*10)
    ft = stat.S_IFMT(mode)
    if stat.S_ISDIR(ft): perms[0] = 'd'

src/l/i/lib-pyFreenet-staging-HEAD/fcp/freenetfs.py   lib-pyFreenet-staging(Download)
        mode = info[stat.ST_MODE]
        return {
            'isdir'  : stat.S_ISDIR(mode),
            'ischr'  : stat.S_ISCHR(mode),
            'isblk'  : stat.S_ISBLK(mode),
 
        if attr == 'isdir':
            return stat.S_ISDIR(self.mode)
 
        if attr == 'ischr':

src/b/u/bup-HEAD/lib/bup/xstat.py   bup(Download)
    if pystat.S_ISREG(mode):
        result += '-'
    elif pystat.S_ISDIR(mode):
        result += 'd'
    elif pystat.S_ISCHR(mode):
        else:
            return ''
    elif pystat.S_ISDIR(mode):
        return '/'
    elif pystat.S_ISLNK(mode):

src/o/h/oh-mainline-HEAD/vendor/packages/twisted/twisted/conch/ls.py   oh-mainline(Download)
    perms = array.array('c', '-'*10)
    ft = stat.S_IFMT(mode)
    if stat.S_ISDIR(ft): perms[0] = 'd'
    elif stat.S_ISCHR(ft): perms[0] = 'c'
    elif stat.S_ISBLK(ft): perms[0] = 'b'

src/m/y/mythbox-HEAD/resources/lib/twisted/twisted/conch/ls.py   mythbox(Download)
def lsLine(name, s):
    mode = s.st_mode
    perms = array.array('c', '-'*10)
    ft = stat.S_IFMT(mode)
    if stat.S_ISDIR(ft): perms[0] = 'd'

src/b/u/bup-HEAD/lib/bup/metadata.py   bup(Download)
    def _recognized_file_type(self):
        return stat.S_ISREG(self.mode) \
            or stat.S_ISDIR(self.mode) \
            or stat.S_ISCHR(self.mode) \
            or stat.S_ISBLK(self.mode) \
                raise
        if st:
            if stat.S_ISDIR(st.st_mode):
                try:
                    os.rmdir(path)
            fd = os.open(path, os.O_CREAT|os.O_WRONLY|os.O_EXCL, 0600)
            os.close(fd)
        elif stat.S_ISDIR(self.mode):
            assert(self._recognized_file_type())
            os.mkdir(path, 0700)
                    acl = posix1e.ACL(file=path)
                    acls = [acl, acl] # txt and num are the same
                    if stat.S_ISDIR(st.st_mode):
                        def_acl = posix1e.ACL(filedef=path)
                        def_acls = [def_acl, def_acl]
    def _add_linux_attr(self, path, st):
        if not get_linux_file_attr: return
        if stat.S_ISREG(st.st_mode) or stat.S_ISDIR(st.st_mode):
            try:
                attr = get_linux_file_attr(path)

  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9  Next