Did I find the right examples for you? yes no

# stat.S_IFDIR

All Samples(56)  |  Call(0)  |  Derive(0)  |  Import(56)
```int(x=0) -> int or long
int(x, base=10) -> int or long

Convert a number or string to an integer, or return 0 if no arguments
are given.  If x is floating point, the conversion truncates towards zero.
If x is outside the integer range, the function returns a long instead.

If x is not a number or if base is given, then x must be a string or
Unicode object representing an integer literal in the given base.  The
literal can be preceded by '+' or '-' and be surrounded by whitespace.(more...)
```

```        self.cursor.execute("INSERT INTO inodes (id,mode,uid,gid,mtime,atime,ctime) "
"VALUES (?,?,?,?,?,?,?)",
(llfuse.ROOT_INODE, stat.S_IFDIR | stat.S_IRUSR | stat.S_IWUSR
| stat.S_IXUSR | stat.S_IRGRP | stat.S_IXGRP | stat.S_IROTH
| stat.S_IXOTH, os.getuid(), os.getgid(), time(),
```

```#!/usr/bin/env python

from collections import defaultdict
from errno import ENOENT, EROFS
from stat import S_IFMT, S_IMODE, S_IFDIR, S_IFREG
```
```        self.children = defaultdict(dict)

self.attr[1] = {'st_ino': 1, 'st_mode': S_IFDIR | 0777, 'st_nlink': 2}
self.parent[1] = 1

```
```        attr = {
'st_ino': ino,
'st_mode': S_IFDIR | mode,
'st_uid': ctx['uid'],
```
```    def readdir(self, req, ino, size, off, fi):
parent = self.parent[ino]
entries = [('.', {'st_ino': ino, 'st_mode': S_IFDIR}),
('..', {'st_ino': parent, 'st_mode': S_IFDIR})]
```

```from collections import defaultdict
from errno import ENOENT
from stat import S_IFDIR, S_IFLNK, S_IFREG
from sys import argv, exit
from time import time
```
```        self.fd = 0
now = time()
self.files['/'] = dict(st_mode=(S_IFDIR | 0755), st_ctime=now,

```
```    def mkdir(self, path, mode):
self.files[path] = dict(st_mode=(S_IFDIR | mode), st_nlink=2,
st_size=0, st_ctime=time(), st_mtime=time(),
st_atime=time())

```

```#!/usr/bin/env python

from errno import ENOENT
from stat import S_IFDIR, S_IFREG
from sys import argv, exit
```
```    def getattr(self, path, fh=None):
uid, gid, pid = fuse_get_context()
if path == '/':
st = dict(st_mode=(S_IFDIR | 0755), st_nlink=2)
elif path == '/uid':
```

```    def getattr(self, path):
st = MyStat()
if path == '/':
st.st_mode = stat.S_IFDIR | 0755
```

```    def getattr(self, path):
st = MyStat()
if path == '/':
st.st_mode = stat.S_IFDIR | 0755
```

```                try:
mode = os.stat(pszDestDataSource).st_mode
if (mode & stat.S_IFDIR) == 0:
pszNewLayerName = os.path.splitext(os.path.basename(pszDestDataSource))[0]
except:
```
```            try:
mode = os.stat(pszDestDataSource).st_mode
if (mode & stat.S_IFDIR) == 0:
pszNewLayerName = os.path.splitext(os.path.basename(pszDestDataSource))[0]
except:
```
```                try:
mode = os.stat(pszDestDataSource).st_mode
if (mode & stat.S_IFDIR) == 0:
pszNewLayerName = os.path.splitext(os.path.basename(pszDestDataSource))[0]
except:
```

```        mode = kw.get('mode', 0)
if kw.get('isdir', False):
mode |= stat.S_IFDIR
if kw.get('ischr', False):
mode |= stat.S_IFCHR
```
```        mode = kw.pop('mode', 0)
if kw.pop('isdir', False):
mode |= stat.S_IFDIR
if kw.pop('ischr', False):
mode |= stat.S_IFCHR
```
```        if attr == 'isdir':
if val:
self[stat.ST_MODE] |= stat.S_IFDIR
else:
self[stat.ST_MODE] &= ~stat.S_IFDIR
```

```def _mode_to_kind(mode):
if statmod.S_ISREG(mode):
return statmod.S_IFREG
if statmod.S_ISDIR(mode):
return statmod.S_IFDIR
```

```def _mode_to_kind(mode):