예제 #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
파일: test_fs.py 프로젝트: ssamson-tis/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)
예제 #3
0
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
파일: test_fs.py 프로젝트: ssamson-tis/WAPT
def test_FileTempAttributes():
    TempFile = tempfile.NamedTemporaryFile()
    assert win32file.GetFileAttributesW(TempFile.name) == fs.entry(
        TempFile.name).attributes.flags