Module win32file
An interface to the win32 File API's
Methods
- AreFileApisANSI
- Determines whether a set of Win32 file functions is using the ANSI or OEM character set code page. This function is useful for 8-bit console input and output operations.
- CancelIo
- Cancels pending IO requests for the object.
- CopyFile
- Copies a file
- CopyFileW
- Copies a file (NT/2000 Unicode specific version)
- CreateDirectory
- Creates a directory
- CreateDirectoryW
- Creates a directory (NT/2000 Unicode specific version)
- CreateDirectoryEx
- Creates a directory
- CreateDirectoryExW
- Creates a directory (NT/2000 Unicode specific version)
- CreateFile
- Creates or opens the a file or other object and returns a handle that can be used to access the object.
- CreateFileW
- An NT/2000 specific Unicode version of CreateFile - see win32file::CreateFile for more information.
- CreateIoCompletionPort
- Can associate an instance of an opened file with a newly created or an existing input/output (I/O) completion port; or it can create an I/O completion port without associating it with a file.
- DefineDosDevice
- Lets an application define, redefine, or delete MS-DOS device names.
- DefineDosDeviceW
- Lets an application define, redefine, or delete MS-DOS device names. (NT/2000 Unicode specific version)
- DeleteFile
- Deletes a file.
- DeleteFileW
- Deletes a file (NT/2000 Unicode specific version)
- DeviceIoControl
- Call DeviceIoControl
- FindClose
- Closes a handle opened with win32file::FindOpen
- FindCloseChangeNotification
- Closes a handle.
- FindFirstChangeNotification
- Creates a change notification handle and sets up initial change notification filter conditions. A wait on a notification handle succeeds when a change matching the filter conditions occurs in the specified directory or subtree.
- FindNextChangeNotification
- Requests that the operating system signal a change notification handle the next time it detects an appropriate change,
- FindFilesW
- Retrieves a list of matching filenames, using the Windows Unicode API. An interface to the API FindFirstFileW/FindNextFileW/Find close functions.
- FindFilesIterator
- Returns an interator based on
FindFirstFile/FindNextFile. Similar to win32file::FindFiles
, but
avoids the creation of the list for huge directories
- FlushFileBuffers
- Clears the buffers for the specified file and causes all buffered data to be written to the file.
- GetBinaryType
- Determines whether a file is executable, and if so, what type of executable file it is. That last property determines which subsystem an executable file runs under.
- GetDiskFreeSpace
- Determines the free space on a device.
- GetDiskFreeSpaceEx
- Determines the free space on a device.
- GetDriveType
- Determines whether a disk drive is a removable, fixed, CD-ROM, RAM disk, or network drive.
- GetDriveTypeW
- Determines whether a disk drive is a removable, fixed, CD-ROM, RAM disk, or network drive. (NT/2000 Unicode specific version).
- GetFileAttributes
- Determines a files attributes.
- GetFileAttributesW
- Determines a files attributes (NT/2000 Unicode specific version).
- GetFileTime
- Determine a file access/modification times.
- GetFileAttributesEx
- Retrieves attributes for a specified file or directory.
- GetFileAttributesExW
- Retrieves attributes for a specified file or directory using Unicode paths.
- SetFileTime
- Sets the date and time that a file was created, last accessed, or last modified.
- GetFileInformationByHandle
- Retrieves file information for a specified file.
- GetCompressedFileSize
- Determines the compressed size of a file.
- GetFileSize
- Determines the size of a file.
- AllocateReadBuffer
- Allocated a buffer which can be used with an overlapped Read operation using win32file::ReadFile
- ReadFile
- Reads a string from a file
- WriteFile
- Writes a string to a file
- CloseHandle
- Closes an open handle.
- LockFileEx
- Locks a file. Wrapper for LockFileEx win32 API.
- UnlockFileEx
- Unlocks a file. Wrapper for UnlockFileEx win32 API.
- GetQueuedCompletionStatus
- Attempts to dequeue an I/O completion packet from a specified input/output completion port.
- PostQueuedCompletionStatus
- lets you post an I/O completion packet to an I/O completion port. The I/O completion packet will satisfy an outstanding call to the GetQueuedCompletionStatus function.
- GetFileType
- Determines the type of a file.
- GetFullPathName
- Returns full path for path passed in
- GetLogicalDrives
- Returns a bitmaks of the logical drives installed.
- GetOverlappedResult
- Determines the result of the most recent call with an OVERLAPPED object.
- LockFile
- Locks a specified file for exclusive access by the calling process.
- MoveFile
- Renames an existing file or a directory (including all its children).
- MoveFileW
- Renames an existing file or a directory (including all its children). (NT/2000 Unicode specific version).
- MoveFileEx
- Renames an existing file or a directory (including all its children).
- MoveFileExW
- Renames an existing file or a directory (including all its children). (NT/2000 Unicode specific version).
- QueryDosDevice
- Returns the mapping for a device name, or all device names
- ReadDirectoryChangesW
- retrieves information describing the changes occurring within a directory.
- FILE_NOTIFY_INFORMATION
- Decodes a PyFILE_NOTIFY_INFORMATION buffer.
- RemoveDirectory
- Removes an existing directory
- SetCurrentDirectory
- Sets the current directory.
- SetEndOfFile
- Moves the end-of-file (EOF) position for the specified file to the current position of the file pointer.
- SetFileApisToANSI
- Causes a set of Win32 file functions to use the ANSI character set code page. This function is useful for 8-bit console input and output operations.
- SetFileApisToOEM
- Causes a set of Win32 file functions to use the OEM character set code page. This function is useful for 8-bit console input and output operations.
- SetFileAttributes
- Changes a file's attributes.
- SetFileAttributesW
- Changes a file's attributes (NT/2000 Unicode specific version)
- SetFilePointer
- Moves the file pointer of an open file.
- SetVolumeLabel
- Sets a volume label for a disk drive.
- UnlockFile
- Unlocks a region of a file locked by win32file::LockFile or win32file::LockFileEx
- _get_osfhandle
- Gets operating-system file handle associated with existing stream
- _open_osfhandle
- Associates a C run-time file handle with a existing operating-system file handle.
- AcceptEx
- Version of accept that uses Overlapped I/O
- GetAcceptExSockaddrs
- Parses the connection endpoints from the buffer passed into AcceptEx
- WSAEventSelect
- Specifies an event object to be associated with the supplied set of FD_XXXX network events.
- WSAAsyncSelect
- Request windows message notification for the supplied set of FD_XXXX network events.
- WSASend
- Winsock send() equivalent function for Overlapped I/O.
- WSARecv
- Winsock recv() equivalent function for Overlapped I/O.
- BuildCommDCB
- Fills the specified DCB structure with values specified in a device-control string. The device-control string uses the syntax of the mode command
- ClearCommError
- retrieves information about a communications error and reports the current status of a communications device.
- EscapeCommFunction
- directs a specified communications device to perform an extended function.
- GetCommState
- Returns a device-control block (a DCB structure) with the current control settings for a specified communications device.
- SetCommState
- Configures a communications device according to the specifications in a device-control block.
The function reinitializes all hardware and control settings, but it does not empty output or input queues.
- ClearCommBreak
- Restores character transmission for a specified communications device and places the transmission line in a nonbreak state
- GetCommMask
- Retrieves the value of the event mask for a specified communications device.
- SetCommMask
- Sets the value of the event mask for a specified communications device.
- GetCommModemStatus
- Retrieves modem control-register values.
- GetCommTimeouts
- Retrieves the time-out parameters for all read and write operations on a specified communications device.
- SetCommTimeouts
- Sets the time-out parameters for all read and write operations on a specified communications device.
- PurgeComm
- Discards all characters from the output or input buffer of a specified communications resource. It can also terminate pending read or write operations on the resource.
- SetCommBreak
- Suspends character transmission for a specified communications device and places the transmission line in a break state until the win32file::ClearCommBreak function is called.
- SetupComm
- Initializes the communications parameters for a specified communications device.
- TransmitCommChar
- Transmits a specified character ahead of any pending data in the output buffer of the specified communications device.
- WaitCommEvent
- Waits for an event to occur for a specified communications device. The set of events that are monitored by this function is contained in the event mask associated with the device handle.
- SetVolumeMountPoint
- Mounts the specified volume at the specified volume mount point.
- DeleteVolumeMountPoint
- Unmounts the volume from the specified volume mount point.
- CreateHardLink
- Establishes an NTFS hard link between an existing file and a new file.
- GetVolumeNameForVolumeMountPoint
- Returns unique volume name (Win2k or later)
- GetVolumePathName
- Returns volume mount point for a path
- EncryptFile
- Encrypts specified file (requires Win2k or higher and NTFS)
- DecryptFile
- Decrypts specified file (requires Win2k or higher and NTFS)
- EncryptionDisable
- Enables/disables encryption for a directory (requires Win2k or higher and NTFS)
- FileEncryptionStatus
- retrieves the encryption status of the specified file.
- QueryUsersOnEncryptedFile
- Returns list of users for an encrypted file as tuples of (SID, certificate hash blob, display info)
- QueryRecoveryAgentsOnEncryptedFile
- Lists recovery agents for file as a tuple of tuples.
- RemoveUsersFromEncryptedFile
- Removes specified certificates from file - if certificate is not found, it is ignored
- AddUsersToEncryptedFile
- Allows user identified by SID and EFS certificate access to decrypt specified file
- BackupRead
- Reads streams of data from a file
- BackupSeek
- Seeks forward in a file stream
- BackupWrite
- Restores file data
- SetFileShortName
- Set the 8.3 name of a file
- CopyFileEx
- Restartable file copy with optional progress routine
- MoveFileWithProgress
- Moves a file, and reports progress to a callback function
- ReplaceFile
- Replaces one file with another
- OpenEncryptedFileRaw
- Initiates a backup or restore operation on an encrypted file
- ReadEncryptedFileRaw
- Reads the encrypted bytes of a file for backup and restore purposes
- WriteEncryptedFileRaw
- Writes raw bytes to an encrypted file
- CloseEncryptedFileRaw
- Frees a context created by win32file::OpenEncryptedFileRaw