semvec/pypi-packages huggingface dataset:
fileUts 0.0.2
File and path manager package
License: MIT
Keywords: fileUts

# fileUts
#
### Installation

```sh
pip install fileUts
```

### Usages
#
___
#### isDir
```py
from fileUts import isDir

add1 = "c:/mydir"
add2 = "c:/mydir/myfile.ext"

print(isDir(add1))
print(isDir(add2))

```
```py
True
False
```
___
#### isFile
```py
from fileUts import isFile

add1 = "c:/mydir"
add2 = "c:/mydir/myfile.ext"

print(isFile(add1))
print(isFile(add2))

```
```py
False
True
```
___
#### fileExists

_Raise_: \<InvalidFile\>

```py
from fileUts import fileExists

add1 = "c:/mydir/myfile.ext"
add2 = "c:/mydir"

print(fileExists(add1))
print(fileExists(add2)) # raises a <InvalidFile>

```
```py
True
```

___
#### dirExists

_Raise_: \<InvalidDir\>

```py
from fileUts import dirExists

add1 = "c:/mydir/myfile.ext"
add2 = "c:/mydir"

print(dirExists(add1)) # raises a <InvalidDir>
print(dirExists(add2))

```
```py
True
```

___
#### getFileExtenssion

_Raise_: \<InvalidFile\>

```py
from fileUts import getFileExtenssion

add1 = "c:/mydir/myfile.ext"
add2 = "c:/mydir"

print(getFileExtenssion(add1))
print(getFileExtenssion(add2)) # raises a <InvalidFile>

```
```py
'ext'
```


___
#### createDir

_Raise_: \<InvalidDir\>

```py
from fileUts import createDir

add1 = "c:/mydir/myfile.ext"
add2 = "c:/mydir"

print(createDir(add1)) # raises a <InvalidDir>
print(createDir(add2))

```
```py
True
```

___
#### createDir

_Raise_: \<InvalidDir\>

```py
from fileUts import createDir

add1 = "c:/mydir/myfile.ext"
add2 = "c:/mydir/mydir2/mydir3"

print(createDir(add1)) # raises a <InvalidDir>
print(createDir(add2))

```
```py
True
```

___
#### moveFiles

_Raise_: \<InvalidDir\>

```py
from fileUts import moveFiles

files   = "c:/mydir/myfile.*"
to_addr = "c:/target_dir"

print(moveFiles(files,to_addr))

```
```py
1
```

___
#### clearDir

_Raise_: \<InvalidDir\>

```py
from fileUts import clearDir

add1 = "c:/mydir/myfile.ext"
add2 = "c:/mydir" 

clearDir(add1) # raises a <InvalidDir>
clearDir(add2)

```
___
#### renameFile

_Raise_: \<InvalidDir\>

```py
from fileUts import renameFile

add1 = "c:/mydir/myfile.ext"
add2 = "c:/mydir" 

renameFile(add1,'newname.ext')
renameFile(add2,,'newname.ext') # raises a <InvalidFile>

```





Change Log
==========

0.0.1 (2022-10-30)
------------------
- First Release


0.0.2 (2022-10-30)
------------------
- Raise Fixed
jsonalias 0.1.2
A microlibrary that defines a Json type alias for Python.
License: MIT
Requires Python: >=3.7,<4.0

# jsonalias

A microlibrary that defines a `Json` type alias for Python.

## This README is longer than the library

Seriously, this is all the code:

```python
from typing import Dict, List, Union

Json = Union[Dict[str, "Json"], List["Json"], str, int, float, bool, None]
```

If we only supported Python >= 3.10, it would fit on one line:

```python
Json = dict[str, 'Json'] | list['Json'] | str | int | float | bool | None
```

## Then why make a library out of it?

I want to use this type alias in multiple projects and it's
just about long enough to be annoying.

This alias should probably get added to the Python `typing` module.
If it does and I haven't put a big notice on this README,
please open a PR.

## Example

```python
from jsonalias import Json

d: Json = {"foo": ["bar", {"x": "y"}]}
```

## It's not working please help???

Make sure you're using mypy >= 0.981 and running with the
`--enable-recursive-aliases` flag.

## Special Thanks

GitHub user wbolster for [this comment](https://github.com/python/typing/issues/182#issuecomment-1259412066)
notifying us that mypy could now do JSON.