Skip to main content

Creating files with custom file size

Project description

MClipp docs

MClipp is a easy library, where you can create big or small files. You can do it using Memory class.

How does it working?

MClipp creates a file, that has custom file size. It multiplies a unit by custom file size in bytes. As it known, the unit is a simple zero (0).

Create

Using "create" method you can create files width custom file size.

Example:

from mclipp import *

clipper = Memory()
clipper.create('filename', 1024)

It creates a file, that has name "filename" and size 1024 bytes.

Pattern:

from mclipp import *

clipper = Memory()
clipper.create(filename, byte)

... where filename is a filename and byte is a file_size.

Delete

Using delete you can delete large or simple files without recovery.

Example:

from mclipp import *

clipper = Memory()
clipper.delete(r'C:/Users/user/Desktop', 'filename')

Here you can delete file "filename", that is in "C:/Users/user/Desktop". You can successful delete this file if it isn't in use.

Pattern:

from mclipp import *

clipper = Memory()
clipper.delete(path, filename)

Bonus: get unit

To get a unit you must to use property unit.

Example:

from mclipp import *

clipper = Memory()
print(clipper.unit)

In current version the unit is "0".

Project details


Release history Release notifications | RSS feed

This version

1.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mclipp-1.1.tar.gz (2.2 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page