CLog 0.1.0
logging as simple as putting on a shoe
Classes | Functions | Variables
clog.utils.common Namespace Reference

Classes

class  LogLevel
 

Functions

bool is_path_spec (str path_spec)
 

Variables

 str
 get the name of the OS More...
 
 __REGEX_PAT = re.compile(r'^(.+)[\\]([^\\]+)\\*$') \
 

Function Documentation

◆ is_path_spec()

bool clog.utils.common.is_path_spec ( str  path_spec)
Evaluate if a given string is a valid pathspec identifier.
Pathspec evaluation is matched against the following regular
expression patterns:
```plaintext
OS Pathspec
    NT:     ^(.+)[\\\\]([^\\\\]+)\\*$
    Other:  ^(.+)[\\/]([^\\/]+)$
OR
Valid names of CWD subdirectories
            ^[\\w\\d\\-_]+$
```
The following pathspecs are evaluated as valid pathspec identifiers
(OS implicitly implied):
    - C:\\User\\user-1\\Documents\\my-project
    - $HOME/.local/bin/my_project
    - ".\\Python Examples\\my-project1"

The following pathspecs are evaluated as invalid pathspec identifiers
(OS implicitly implied)
    - ./this,_is-a(bad)+pathspec

`@Params`: path_spec - `str`
`@Return`: `bool`

Variable Documentation

◆ __REGEX_PAT

clog.utils.common.__REGEX_PAT = re.compile(r'^(.+)[\\]([^\\]+)\\*$') \
private

◆ str

clog.utils.common.str

get the name of the OS