예제 #1
0
 def callback(smb_fs: smbfs.SMBFS):
     for walk_path in smb_fs.walk.dirs(path, max_depth=1):
         if (smb_fs.exists(walk_path)):
             info = smb_fs.getinfo(walk_path)
             find_data = wintypes.WIN32_FIND_DATAW()
             find_data.dwFileAttributes = 16
             find_data.cFileName = info.name
             argus[1](pointer(find_data), argus[2])
     for walk_path in smb_fs.walk.files(path, max_depth=1):
         if (smb_fs.exists(walk_path)):
             info = smb_fs.getinfo(walk_path)
             filesize = smb_fs.getsize(walk_path)
             find_data = wintypes.WIN32_FIND_DATAW()
             find_data.dwFileAttributes = 32
             find_data.cFileName = info.name
             if (len(info.name) >= 11):
                 info_cut = info.name.split(".")
                 cAlternateFileName = info_cut[0][
                     0:6] + "~1." + info.suffix[0:3]
             else:
                 find_data.cAlternateFileName = info.name
             find_data.ftCreationTime = wintypes.FILETIME()
             find_data.ftLastAccessTime = wintypes.FILETIME()
             find_data.ftLastWriteTime = wintypes.FILETIME()
             find_data.nFileSizeHigh = wintypes.DWORD(0)
             find_data.nFileSizeLow = wintypes.DWORD(filesize)
             find_data.dwReserved0 = wintypes.DWORD(0)
             find_data.dwReserved1 = wintypes.DWORD(0)
             argus[1](pointer(find_data), argus[2])
예제 #2
0
 def callback(smb_fs: smbfs.SMBFS):
     nonlocal write_len
     f = smb_fs.open(file_path, "ab")
     f.seek(offset, 0)
     write_len = f.write(byte_for_write)
     f.close()
예제 #3
0
 def callback2(smb_fs: smbfs.SMBFS):
     nonlocal read_out
     f = smb_fs.open(file_path, "rb")
     f.seek(offset, 0)
     read_out = f.read(buffer_len)
     f.close()
예제 #4
0
 def callback(smb_fs: smbfs.SMBFS):
     nonlocal filesize
     smb_fs.getsize(file_path)
예제 #5
0
 def callback2(smb_fs: smbfs.SMBFS):
     smb_fs.removedir(file_path)
예제 #6
0
 def callback(smb_fs: smbfs.SMBFS):
     smb_fs.remove(file_path)
예제 #7
0
 def callback2(smb_fs: smbfs.SMBFS):
     smb_fs.create(path)
예제 #8
0
 def callback(smb_fs: smbfs.SMBFS):
     smb_fs.makedir(path)
예제 #9
0
 def callback(smb_fs: smbfs.SMBFS):
     nonlocal filesize
     filesize = smb_fs.getsize(path)
예제 #10
0
 def callback(smb_fs: smbfs.SMBFS):
     nonlocal is_file
     if (is_file):
         smb_fs.move(src_path, dst_path, argus[2])
     else:
         smb_fs.movedir(src_path, dst_path, True)
예제 #11
0
 def callback(smb_fs: smbfs.SMBFS):
     nonlocal isempty
     isempty = smb_fs.isempty(path)
예제 #12
0
 def callback(smb_fs: smbfs.SMBFS):
     nonlocal is_file
     is_file = smb_fs.isfile(path)
예제 #13
0
 def callback(smb_fs: smbfs.SMBFS):
     nonlocal is_exists
     is_exists = smb_fs.exists(path)