enigma2  2.6
Functions | Variables
Tools.Directories Namespace Reference

Functions

def resolveFilename (scope, base="", path_prefix=None)
 
def pathExists (path)
 
def isMount (path)
 
def createDir (path, makeParents=False)
 
def removeDir (path)
 
def fileExists (f, mode='r')
 
def getRecordingFilename (basename, dirname=None)
 
def InitFallbackFiles ()
 
def crawlDirectory (directory, pattern)
 
def copyfile (src, dst)
 
def copytree (src, dst, symlinks=False)
 
def getSize (path, pattern=".*")
 
def prettySize (size)
 

Variables

bool have_chmod = True
 
bool have_utime = True
 
int SCOPE_TRANSPONDERDATA = 0
 
int SCOPE_SYSETC = 1
 
int SCOPE_FONTS = 2
 
int SCOPE_DATADIR = 3
 
int SCOPE_SKIN_IMAGE = 4
 
int SCOPE_USERETC = 5
 
int SCOPE_CONFIG = 6
 
int SCOPE_LANGUAGE = 7
 
int SCOPE_HDD = 8
 
int SCOPE_PLUGINS = 9
 
int SCOPE_MEDIA = 10
 
int SCOPE_PLAYLIST = 11
 
int SCOPE_CURRENT_SKIN = 12
 
int SCOPE_DEFAULTDIR = 13
 
int SCOPE_DEFAULTPARTITION = 14
 
int SCOPE_DEFAULTPARTITIONMOUNTDIR = 15
 
int SCOPE_METADIR = 16
 
int SCOPE_CURRENT_PLUGIN = 17
 
int SCOPE_RCU_FIRMWARE = 18
 
int SCOPE_SKIN = SCOPE_DATADIR
 
int PATH_CREATE = 0
 
int PATH_DONTCREATE = 1
 
int PATH_FALLBACK = 2
 
dictionary defaultPaths
 
int FILE_COPY = 0
 
int FILE_MOVE = 1
 
int PATH_COPY = 2
 
int PATH_MOVE = 3
 
dictionary fallbackPaths
 

Function Documentation

◆ copyfile()

def Tools.Directories.copyfile (   src,
  dst 
)

◆ copytree()

def Tools.Directories.copytree (   src,
  dst,
  symlinks = False 
)

◆ crawlDirectory()

def Tools.Directories.crawlDirectory (   directory,
  pattern 
)

◆ createDir()

def Tools.Directories.createDir (   path,
  makeParents = False 
)

◆ fileExists()

def Tools.Directories.fileExists (   f,
  mode = 'r' 
)

◆ getRecordingFilename()

def Tools.Directories.getRecordingFilename (   basename,
  dirname = None 
)

◆ getSize()

def Tools.Directories.getSize (   path,
  pattern = ".*" 
)

◆ InitFallbackFiles()

def Tools.Directories.InitFallbackFiles ( )

◆ isMount()

def Tools.Directories.isMount (   path)

◆ pathExists()

def Tools.Directories.pathExists (   path)

◆ prettySize()

def Tools.Directories.prettySize (   size)

◆ removeDir()

def Tools.Directories.removeDir (   path)

◆ resolveFilename()

def Tools.Directories.resolveFilename (   scope,
  base = "",
  path_prefix = None 
)

Variable Documentation

◆ defaultPaths

dictionary Tools.Directories.defaultPaths
Initial value:
1 = {
2  SCOPE_TRANSPONDERDATA: (eEnv.resolve("${sysconfdir}/"), PATH_DONTCREATE),
3  SCOPE_SYSETC: (eEnv.resolve("${sysconfdir}/"), PATH_DONTCREATE),
4  SCOPE_FONTS: (eEnv.resolve("${datadir}/fonts/"), PATH_DONTCREATE),
5  SCOPE_CONFIG: (eEnv.resolve("${sysconfdir}/enigma2/"), PATH_CREATE),
6  SCOPE_PLUGINS: (eEnv.resolve("${libdir}/enigma2/python/Plugins/"), PATH_CREATE),
7 
8  SCOPE_LANGUAGE: (eEnv.resolve("${datadir}/enigma2/po/"), PATH_DONTCREATE),
9 
10  SCOPE_DATADIR: (eEnv.resolve("${datadir}/enigma2/"), PATH_DONTCREATE),
11  SCOPE_SKIN_IMAGE: (eEnv.resolve("${datadir}/enigma2/"), PATH_DONTCREATE),
12  SCOPE_HDD: ("/media/hdd/movie/", PATH_DONTCREATE),
13  SCOPE_MEDIA: ("/media/", PATH_DONTCREATE),
14  SCOPE_PLAYLIST: (eEnv.resolve("${sysconfdir}/enigma2/playlist/"), PATH_CREATE),
15 
16  SCOPE_USERETC: ("", PATH_DONTCREATE), # user home directory
17 
18  SCOPE_DEFAULTDIR: (eEnv.resolve("${datadir}/enigma2/defaults/"), PATH_CREATE),
19  SCOPE_DEFAULTPARTITION: ("/dev/mtdblock6", PATH_DONTCREATE),
20  SCOPE_DEFAULTPARTITIONMOUNTDIR: (eEnv.resolve("${datadir}/enigma2/dealer"), PATH_CREATE),
21  SCOPE_METADIR: (eEnv.resolve("${datadir}/meta"), PATH_CREATE),
22  SCOPE_RCU_FIRMWARE: (eEnv.resolve("${datadir}/nrf52-firmware-rcu"), PATH_DONTCREATE),
23  }

◆ fallbackPaths

dictionary Tools.Directories.fallbackPaths
Initial value:
1 = {
2  SCOPE_CONFIG: [(eEnv.resolve("${datadir}/enigma2/defaults/"), FILE_COPY)],
3  SCOPE_HDD: [("/media/hdd/movies", PATH_MOVE)]
4  }

◆ FILE_COPY

int Tools.Directories.FILE_COPY = 0

◆ FILE_MOVE

int Tools.Directories.FILE_MOVE = 1

◆ have_chmod

bool Tools.Directories.have_chmod = True

◆ have_utime

bool Tools.Directories.have_utime = True

◆ PATH_COPY

int Tools.Directories.PATH_COPY = 2

◆ PATH_CREATE

int Tools.Directories.PATH_CREATE = 0

◆ PATH_DONTCREATE

int Tools.Directories.PATH_DONTCREATE = 1

◆ PATH_FALLBACK

int Tools.Directories.PATH_FALLBACK = 2

◆ PATH_MOVE

int Tools.Directories.PATH_MOVE = 3

◆ SCOPE_CONFIG

int Tools.Directories.SCOPE_CONFIG = 6

◆ SCOPE_CURRENT_PLUGIN

int Tools.Directories.SCOPE_CURRENT_PLUGIN = 17

◆ SCOPE_CURRENT_SKIN

int Tools.Directories.SCOPE_CURRENT_SKIN = 12

◆ SCOPE_DATADIR

int Tools.Directories.SCOPE_DATADIR = 3

◆ SCOPE_DEFAULTDIR

int Tools.Directories.SCOPE_DEFAULTDIR = 13

◆ SCOPE_DEFAULTPARTITION

int Tools.Directories.SCOPE_DEFAULTPARTITION = 14

◆ SCOPE_DEFAULTPARTITIONMOUNTDIR

int Tools.Directories.SCOPE_DEFAULTPARTITIONMOUNTDIR = 15

◆ SCOPE_FONTS

int Tools.Directories.SCOPE_FONTS = 2

◆ SCOPE_HDD

int Tools.Directories.SCOPE_HDD = 8

◆ SCOPE_LANGUAGE

int Tools.Directories.SCOPE_LANGUAGE = 7

◆ SCOPE_MEDIA

int Tools.Directories.SCOPE_MEDIA = 10

◆ SCOPE_METADIR

int Tools.Directories.SCOPE_METADIR = 16

◆ SCOPE_PLAYLIST

int Tools.Directories.SCOPE_PLAYLIST = 11

◆ SCOPE_PLUGINS

int Tools.Directories.SCOPE_PLUGINS = 9

◆ SCOPE_RCU_FIRMWARE

int Tools.Directories.SCOPE_RCU_FIRMWARE = 18

◆ SCOPE_SKIN

int Tools.Directories.SCOPE_SKIN = SCOPE_DATADIR

◆ SCOPE_SKIN_IMAGE

int Tools.Directories.SCOPE_SKIN_IMAGE = 4

◆ SCOPE_SYSETC

int Tools.Directories.SCOPE_SYSETC = 1

◆ SCOPE_TRANSPONDERDATA

int Tools.Directories.SCOPE_TRANSPONDERDATA = 0

◆ SCOPE_USERETC

int Tools.Directories.SCOPE_USERETC = 5