Esempio n. 1
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)
Esempio n. 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)
Esempio n. 3
0
def deny_access (filepath):
  with fs.entry (filepath).security () as s:
    s.dacl.append (("", "F", "DENY"))
Esempio n. 4
0
def test_FileTempAttributes():
  TempFile=tempfile.NamedTemporaryFile()
  assert win32file.GetFileAttributesW(TempFile.name)==fs.entry(TempFile.name).attributes.flags
Esempio n. 5
0
def get_path(folder_id):
    return fs.entry(
        shell.SHGetPathFromIDList(
            shell.SHGetSpecialFolderLocation(0, folder_id)))
Esempio n. 6
0
 def _get_path(self):
     filepath, data = self._shell_link.GetPath(SLGP.UNCPRIORITY)
     return fs.entry(filepath)
Esempio n. 7
0
 def _get_icon_location(self):
     path, index = self._shell_link.GetIconLocation()
     return fs.entry(path), index
Esempio n. 8
0
def get_path(folder_id):
    return fs.entry(shell.SHGetPathFromIDList(shell.SHGetSpecialFolderLocation(0, folder_id)))
Esempio n. 9
0
 def _get_path(self):
     filepath, data = self._shell_link.GetPath(SLGP.UNCPRIORITY)
     return fs.entry(filepath)
Esempio n. 10
0
 def _get_icon_location(self):
     path, index = self._shell_link.GetIconLocation()
     return fs.entry(path), index
Esempio n. 11
0
def deny_access (filepath):
  with fs.entry (filepath).security () as s:
    s.dacl.append (("", "F", "DENY"))
Esempio n. 12
0
def test_FileTempAttributes():
    TempFile = tempfile.NamedTemporaryFile()
    assert win32file.GetFileAttributesW(TempFile.name) == fs.entry(
        TempFile.name).attributes.flags