Skip to main content

CloudFileOp

Summary

Performs file related operations that are cloud specific.

Discussion

This class cannot be instantiated directly. An instance of this class is returned by the AIOFile object's cloud property.

Methods

clearcache()

Clears file properties and BLOB region cache. Call this method when an external process updates the file.

cloud_io = AIO(r"C:\data\datacloud.acs")
rcsfile = cloud_io.open(r'testfile.txt', 'r')
rcsfile.cloud.clearcache()

usebufferedreader()

Caches last read bytes.

cloud_io = AIO(r"C:\data\datacloud.acs")
rcsfile = cloud_io.open(r'testfile.txt', 'r')
rcsfile.cloud.usebufferedreader()

usecachedfile({blocksize}, {cachesize})

Uses least recently used (LRU) block cache for handling files on cloud.

Name Explanation Data type

blocksize

(Optional)

The block size.

The default value is 32768.

Integer

cachesize

(Optional)

The cache size.

The default value is 0.

Integer

cloud_io = AIO(r"C:\data\datacloud.acs")
rcsfile = cloud_io.open(r'testfile.txt', 'r')
rcsfile.cloud.usecachedfile(blocksize=32768, cachesize=0)