def create(self, token, path, userid, fileid, parentid=ROOT_PARENT_ID):
    self.token = token
    self.path = path
    cs = os.path.split(path)
    self.dir = cs[0]
    self.time = time.time()
    self.size = (- 1)
    self.cur = 0
    self.file = None
    self.file_init = False
    self.fileid = fileid
    self.userid = userid
    self.parentid = parentid
    if ((len(cs) == 1) or (cs[1] == '') or (cs[1] == None)):
        self.name = cs[0]
    else:
        self.name = cs[1]
    self.gen_realpath()
def create(self, token, path, userid, fileid, parentid=ROOT_PARENT_ID):
    self.token = token
    self.path = path
    cs = os.path.split(path)
    self.dir = cs[0]
    self.time = time.time()
    self.size = (- 1)
    self.cur = 0
    self.file = None
    self.file_init = False
    self.fileid = fileid
    self.userid = userid
    self.parentid = parentid
    if ((len(cs) == 1) or (cs[1] == ) or (cs[1] == None)):
        self.name = cs[0]
    else:
        self.name = cs[1]
    self.gen_realpath()