示例#1
0
文件: test_fs.py 项目: hashar/WAPT
def test_FileAttributes():
  TempFile=os.path.expandvars("%temp%\\FileAtr.txt")
  try:
    open(TempFile,"w").close()
    assert win32file.GetFileAttributesW(TempFile)==fs.entry(TempFile).attributes.flags
  finally:
    os.unlink(TempFile)
示例#2
0
def test_FileAttributes():
    TempFile = os.path.expandvars("%temp%\\FileAtr.txt")
    try:
        open(TempFile, "w").close()
        assert win32file.GetFileAttributesW(TempFile) == fs.entry(
            TempFile).attributes.flags
    finally:
        os.unlink(TempFile)
def deny_access (filepath):
  with fs.entry (filepath).security () as s:
    s.dacl.append (("", "F", "DENY"))
示例#4
0
文件: test_fs.py 项目: hashar/WAPT
def test_FileTempAttributes():
  TempFile=tempfile.NamedTemporaryFile()
  assert win32file.GetFileAttributesW(TempFile.name)==fs.entry(TempFile.name).attributes.flags
示例#5
0
def get_path(folder_id):
    return fs.entry(
        shell.SHGetPathFromIDList(
            shell.SHGetSpecialFolderLocation(0, folder_id)))
示例#6
0
 def _get_path(self):
     filepath, data = self._shell_link.GetPath(SLGP.UNCPRIORITY)
     return fs.entry(filepath)
示例#7
0
 def _get_icon_location(self):
     path, index = self._shell_link.GetIconLocation()
     return fs.entry(path), index
示例#8
0
文件: shell.py 项目: Azure8705/winsys
def get_path(folder_id):
    return fs.entry(shell.SHGetPathFromIDList(shell.SHGetSpecialFolderLocation(0, folder_id)))
示例#9
0
文件: shell.py 项目: Azure8705/winsys
 def _get_path(self):
     filepath, data = self._shell_link.GetPath(SLGP.UNCPRIORITY)
     return fs.entry(filepath)
示例#10
0
文件: shell.py 项目: Azure8705/winsys
 def _get_icon_location(self):
     path, index = self._shell_link.GetIconLocation()
     return fs.entry(path), index
示例#11
0
文件: utils.py 项目: Azure8705/winsys
def deny_access (filepath):
  with fs.entry (filepath).security () as s:
    s.dacl.append (("", "F", "DENY"))
示例#12
0
def test_FileTempAttributes():
    TempFile = tempfile.NamedTemporaryFile()
    assert win32file.GetFileAttributesW(TempFile.name) == fs.entry(
        TempFile.name).attributes.flags