Panda3D

Loading...
Searching...
No Matches
Classes | Functions | Variables
direct.stdpy.file Namespace Reference

## Classes
class | StreamIOWrapper

## Functions
| execfile (path, globals=None, locals=None)
| exists (path)
| getmtime (path)
| getsize (path)
| isdir (path)
| isfile (path)
| lexists (path)
| listdir (path)
| open (file, mode='r', buffering=-1, encoding=None, errors=None, newline=None, closefd=True)
| walk (top, topdown=True, onerror=None, followlinks=True)

## Variables
| _vfs = core.VirtualFileSystem.getGlobalPtr()
| file = open
| FileExistsError = IOError
| FileNotFoundError = IOError
| IsADirectoryError = IOError
| PermissionError = IOError
| strType = str
| unicodeType = unicode

## Detailed Description

     This module reimplements Python's file I/O mechanisms using Panda
    constructs.  This enables Python to interface more easily with Panda's
    virtual file system, and it also better-supports Panda's
    SIMPLE_THREADS model, by avoiding blocking all threads while waiting
    for I/O to complete.

## Function Documentation

## ◆ execfile()

execfile | ( |  | path,
|  |  | globals = None,
|  |  | locals = None )

## ◆ exists()

exists | ( |  | path | ) |

## ◆ getmtime()

getmtime | ( |  | path | ) |

## ◆ getsize()

getsize | ( |  | path | ) |

## ◆ isdir()

isdir | ( |  | path | ) |

## ◆ isfile()

isfile | ( |  | path | ) |

## ◆ lexists()

lexists | ( |  | path | ) |

## ◆ listdir()

listdir | ( |  | path | ) |

     Implements os.listdir over vfs.

## ◆ open()

open | ( |  | file,
|  |  | mode = 'r',
|  |  | buffering = -1,
|  |  | encoding = None,
|  |  | errors = None,
|  |  | newline = None,
|  |  | closefd = True )

    This function emulates the built-in Python open() function, additionally
    providing support for Panda's virtual file system.  It takes the same
    arguments as Python's built-in open() function.

## ◆ walk()

walk | ( |  | top,
|  |  | topdown = True,
|  |  | onerror = None,
|  |  | followlinks = True )

     Implements os.walk over vfs.

    Note: we don't support onerror or followlinks; errors are ignored
    and links are always followed.

## Variable Documentation

## ◆ _vfs

_vfs = core.VirtualFileSystem.getGlobalPtr()
| protected

## ◆ file

file = open

## ◆ FileExistsError

FileExistsError = IOError

## ◆ FileNotFoundError

FileNotFoundError = IOError

## ◆ IsADirectoryError

IsADirectoryError = IOError

## ◆ PermissionError

PermissionError = IOError

## ◆ strType

tuple strType = str

## ◆ unicodeType

unicodeType = unicode