Package libxyz :: Package vfs :: Module util
[hide private]
[frames] | no frames]

Module util

source code

Functions [hide private]
 
get_file_type(st_mode)
Find out file type
source code
 
format_size(size)
Format file-object size
source code
 
split_path(path) source code
 
get_user(uid=None)
Get user name by UID
source code
 
get_group(gid=None)
Get group name by GID
source code
Variables [hide private]
  _types = stat.S_ISDIR, vfstypes.VFSTypeDir, (stat.S_ISCHR, vfs...
Function Details [hide private]

get_file_type(st_mode)

source code 

Find out file type

Parameters:
  • st_mode - Raw st_mode obtained from os.stat()

get_user(uid=None)

source code 

Get user name by UID

Parameters:
  • uid - User ID
Returns:
username or None

get_group(gid=None)

source code 

Get group name by GID

Parameters:
  • gid - Group ID
Returns:
group name or None

Variables Details [hide private]

_types

Value:
stat.S_ISDIR, vfstypes.VFSTypeDir, (stat.S_ISCHR, vfstypes.VFSTypeChar\
), (stat.S_ISBLK, vfstypes.VFSTypeBlock), (stat.S_ISREG, vfstypes.VFST\
ypeFile), (stat.S_ISFIFO, vfstypes.VFSTypeFifo), (stat.S_ISLNK, vfstyp\
es.VFSTypeLink), (stat.S_ISSOCK, vfstypes.VFSTypeSocket),