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 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"))
def test_FileTempAttributes(): TempFile=tempfile.NamedTemporaryFile() assert win32file.GetFileAttributesW(TempFile.name)==fs.entry(TempFile.name).attributes.flags
def get_path(folder_id): return fs.entry( shell.SHGetPathFromIDList( shell.SHGetSpecialFolderLocation(0, folder_id)))
def _get_path(self): filepath, data = self._shell_link.GetPath(SLGP.UNCPRIORITY) return fs.entry(filepath)
def _get_icon_location(self): path, index = self._shell_link.GetIconLocation() return fs.entry(path), index
def get_path(folder_id): return fs.entry(shell.SHGetPathFromIDList(shell.SHGetSpecialFolderLocation(0, folder_id)))
def test_FileTempAttributes(): TempFile = tempfile.NamedTemporaryFile() assert win32file.GetFileAttributesW(TempFile.name) == fs.entry( TempFile.name).attributes.flags