Nevar pievienot vairāk kā 25 tēmas
Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
|
- import os
- from cld import *
- from fs_aux import *
- from ht_Context import *
-
- # Extract directory from config path
- #
- # Conditions:
- # 1. Config path has just been set
- @cld_by_value
- def fs_locateConfigDir(
- c: ht_Context
- ) -> ht_Context:
- if (
- c.recentField == "cfgPath"
- ):
- c.cfgDir = os.path.dirname(c.cfgPath)
- c.recentField = "cfgDir"
- return c
-
- c.recentField = "none"
- return c
-
- # Read config file contents
- #
- # Conditions:
- # 1. Config path has just been set
- @cld_by_value
- def fs_readConfig(
- c: ht_Context
- ) -> ht_Context:
- if (
- c.recentField == "cfgPath"
- ):
- c.cfgContents = fs_aux_readFile(c.cfgPath)
- c.recentField = "cfgContents"
- return c
-
- c.recentField = "none"
- return c
|