You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
data-transport/transport/disk.py

86 lines
1.9 KiB
Python

import os
from .__init__ import Reader,Writer
import json
class DiskReader(Reader) :
"""
This class is designed to read data from disk (location on hard drive)
@pre : isready() == True
"""
def __init__(self,**params):
"""
@param path absolute path of the file to be read
"""
Reader.__init__(self)
self.path = params['path'] ;
def isready(self):
return os.path.exists(self.path)
def read(self,size=-1):
"""
5 years ago
self.name = 'out.log'
# if os.path.exists(self.path) == False:
# os.mkdir(self.path)