apptools.io.file module

A representation of files and folders in a file system.

class apptools.io.file.File(path, **traits)[source]

Bases: HasPrivateTraits

A representation of files and folders in a file system.

copy(destination)[source]

Copies this file/folder.

create_file(contents='')[source]

Creates a file at this path.

create_folder()[source]

Creates a folder at this path.

All intermediate folders MUST already exist.

create_folders()[source]

Creates a folder at this path.

This will attempt to create any missing intermediate folders.

create_package()[source]

Creates a package at this path.

All intermediate folders/packages MUST already exist.

delete()[source]

Deletes this file/folder.

Does nothing if the file/folder does not exist.

make_writeable()[source]

Attempt to make the file/folder writeable.

move(destination)[source]

Moves this file/folder.