Пример #1
0
def testlistAll():
    session=fm.session_factory()
    um=fm.userManager()    
    usr=um.getUser('rdi',session)
    fman=fm.fileManager(usr,session)
    fman.listAll('/')
    fman.showDirTable()
Пример #2
0
def testgetfile():
    session=fm.session_factory()
    um=fm.userManager()    
    usr=um.getUser('rdi',session)
    fman=fm.fileManager(usr,session)    
    record= fman.get_file('/dirtoto/testtoto34.txt',content=True)
    print record
    print record.content
Пример #3
0
def testsavefile():
    session=fm.session_factory()
    um=fm.userManager()    
    usr=um.getUser('rdi',session)
    fman=fm.fileManager(usr,session) 
    toto='435804395843095430584305048358034'
    fman.save_file('/dirtoto/testfile34.txt',toto)
    fman.save_file('/dirtoto/testfile1.txt',toto)
    fman.save_file('/dirtoto/dirtotot4/testfile3.txt',toto)
Пример #4
0
def testcreateDir():
    session=fm.session_factory()
    um=fm.userManager()    
    usr=um.getUser('rdi',session)
    fman=fm.fileManager(usr,session)   
    fman.create_directory('/dirtoto')    
    fman.create_directory('/dirtoto/dirtotot2')
    fman.create_directory('/dirtoto/dirtotot4')
    fman.create_directory('/dirtotot3')
Пример #5
0
def testrenamefile():
    session=fm.session_factory()
    um=fm.userManager()    
    usr=um.getUser('rdi',session)
    fman=fm.fileManager(usr,session)    
    fman.rename_file('/dirtoto/testfile3.txt','/dirtoto/testtoto34.txt')
Пример #6
0
def testrenamedirectory():
    session=fm.session_factory()
    um=fm.userManager()    
    usr=um.getUser('rdi',session)
    fman=fm.fileManager(usr,session)    
    fman.rename_directory('/dirtoto/','/dirtoto0/')
Пример #7
0
def testdeletefile():
    session=fm.session_factory()
    um=fm.userManager()    
    usr=um.getUser('rdi',session)
    fman=fm.fileManager(usr,session) 
    fman.delete_file('/dirtoto/testfile34.txt')
Пример #8
0
def testgetUser():
    session=fm.session_factory()
    um=fm.userManager()    
    print um.getUser('rdi',session)
Пример #9
0
def testShowUser():
    session=fm.session_factory()
    um=fm.userManager()
    um.showUsers(session)
Пример #10
0
def testremovedir():
    session=fm.session_factory()
    um=fm.userManager()    
    usr=um.getUser('rdi',session)
    fman=fm.fileManager(usr,session) 
    fman.delete_directory('/dirtoto/dirtotot4/')