openFile

suspend fun openFile(path: String, desiredAccess: UInt = SmbAccessMask.READ_DEFAULT, shareAccess: UInt = SmbShareAccess.ALL, createDisposition: SmbCreateDisposition = SmbCreateDisposition.FILE_OPEN, fileAttributes: UInt = SmbFileAttributes.NORMAL, createOptions: UInt = SmbCreateOptions.FILE_NON_DIRECTORY_FILE or SmbCreateOptions.FILE_SYNCHRONOUS_IO_NONALERT): SmbFile

Opens a file with the specified access mask and sharing mode, returning an SmbFile handle.

Pass shareAccess = SmbShareAccess.EXCLUSIVE to open the file with an exclusive share lock that denies concurrent opens from other processes.