xbmc
Classes

Kodi's file class. More...

Collaboration diagram for File:

Classes

class  XBMCAddon::xbmcvfs::File
 

Detailed Description

Kodi's file class.

{ xbmcvfs.File(filepath, [mode]) }

Parameters
filepathstring Selected file path
mode[opt] string Additional mode options (if no mode is supplied, the default is Open for Read).
Mode Description
w Open for write

Added context manager support

Example:

..
f = xbmcvfs.File(file, 'w')
..

Example (v19 and up):

..
with xbmcvfs.File(file, 'w') as f:
..
..