Kodi Documentation 18.0
Kodi is an open source media player and entertainment hub.

Get file or file system status. More...

Classes

class  XBMCAddon::xbmcvfs::Stat
 

Functions

 XBMCAddon::xbmcvfs::Stat::st_mode ()
 
 XBMCAddon::xbmcvfs::Stat::st_ino ()
 
 XBMCAddon::xbmcvfs::Stat::st_dev ()
 
 XBMCAddon::xbmcvfs::Stat::st_nlink ()
 
 XBMCAddon::xbmcvfs::Stat::st_uid ()
 
 XBMCAddon::xbmcvfs::Stat::st_gid ()
 
 XBMCAddon::xbmcvfs::Stat::st_size ()
 
 XBMCAddon::xbmcvfs::Stat::st_atime ()
 
 XBMCAddon::xbmcvfs::Stat::st_mtime ()
 
 XBMCAddon::xbmcvfs::Stat::st_ctime ()
 

Detailed Description

Get file or file system status.

Class: xbmcvfs.Stat(path)

These class return information about a file. Execute (search) permission is required on all of the directories in path that lead to the file.

Parameters
path[string] file or folder

v12 Python API changes:
New function added

Example:

..
st = xbmcvfs.Stat(path)
modified = st.st_mtime()
..

Function Documentation

◆ st_atime()

XBMCAddon::xbmcvfs::Stat::st_atime ( )

@brief \htmlonly <h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font color=31363b><big> st_atime() </big></font></span></code></h4> \endhtmlonly

To get time of last access.

Returns
st_atime

◆ st_ctime()

XBMCAddon::xbmcvfs::Stat::st_ctime ( )

@brief \htmlonly <h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font color=31363b><big> st_ctime() </big></font></span></code></h4> \endhtmlonly

To get time of last status change.

Returns
st_ctime

◆ st_dev()

XBMCAddon::xbmcvfs::Stat::st_dev ( )

@brief \htmlonly <h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font color=31363b><big> st_dev() </big></font></span></code></h4> \endhtmlonly

To get ID of device containing file.

The st_dev field describes the device on which this file resides.

Returns
st_dev

◆ st_gid()

XBMCAddon::xbmcvfs::Stat::st_gid ( )

@brief \htmlonly <h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font color=31363b><big> st_gid() </big></font></span></code></h4> \endhtmlonly

To get group ID of owner.

Returns
st_gid

◆ st_ino()

XBMCAddon::xbmcvfs::Stat::st_ino ( )

@brief \htmlonly <h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font color=31363b><big> st_ino() </big></font></span></code></h4> \endhtmlonly

To get inode number.

Returns
st_ino

◆ st_mode()

XBMCAddon::xbmcvfs::Stat::st_mode ( )

@brief \htmlonly <h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font color=31363b><big> st_mode() </big></font></span></code></h4> \endhtmlonly

To get file protection.

Returns
st_mode

◆ st_mtime()

XBMCAddon::xbmcvfs::Stat::st_mtime ( )

@brief \htmlonly <h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font color=31363b><big> st_mtime() </big></font></span></code></h4> \endhtmlonly

To get time of last modification.

Returns
st_mtime

◆ st_nlink()

XBMCAddon::xbmcvfs::Stat::st_nlink ( )

@brief \htmlonly <h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font color=31363b><big> st_nlink() </big></font></span></code></h4> \endhtmlonly

To get number of hard links.

Returns
st_nlink

◆ st_size()

XBMCAddon::xbmcvfs::Stat::st_size ( )

@brief \htmlonly <h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font color=31363b><big> st_size() </big></font></span></code></h4> \endhtmlonly

To get total size, in bytes.

The st_size field gives the size of the file (if it is a regular file or a symbolic link) in bytes. The size of a symbolic link (only on Linux and Mac OS X) is the length of the pathname it contains, without a terminating null byte.

Returns
st_size

◆ st_uid()

XBMCAddon::xbmcvfs::Stat::st_uid ( )

@brief \htmlonly <h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font color=31363b><big> st_uid() </big></font></span></code></h4> \endhtmlonly

To get user ID of owner.

Returns
st_uid