File: FileManager.pyi

package info (click to toggle)
python-pyvmomi 9.0.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 21,372 kB
  • sloc: python: 18,622; xml: 77; makefile: 3
file content (69 lines) | stat: -rw-r--r-- 3,238 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# Copyright (c) 2006-2025 Broadcom. All Rights Reserved.
# Broadcom Confidential. The term "Broadcom" refers to Broadcom Inc.
# and/or its subsidiaries.

# ******* WARNING - AUTO GENERATED CODE - DO NOT EDIT *******

from datetime import datetime

from typing import ClassVar
from typing import NoReturn
from typing import Optional

from pyVmomi.VmomiSupport import Enum
from pyVmomi.VmomiSupport import ManagedObject
from pyVmomi.VmomiSupport import long

from pyVmomi.vim import VirtualMachine

from pyVmomi.vmodl import DynamicData

from pyVmomi.vim.vm.guest import GuestAuthentication

class FileManager(ManagedObject):
   class FileAttributes(DynamicData):
      modificationTime: Optional[datetime] = None
      accessTime: Optional[datetime] = None
      symlinkTarget: Optional[str] = None

   class PosixFileAttributes(FileAttributes):
      ownerId: Optional[int] = None
      groupId: Optional[int] = None
      permissions: Optional[long] = None

   class WindowsFileAttributes(FileAttributes):
      hidden: Optional[bool] = None
      readOnly: Optional[bool] = None
      createTime: Optional[datetime] = None

   class FileInfo(DynamicData):
      class FileType(Enum):
         file: ClassVar['FileType'] = 'file'
         directory: ClassVar['FileType'] = 'directory'
         symlink: ClassVar['FileType'] = 'symlink'

      path: str
      type: str
      size: long
      attributes: FileAttributes

   class ListFileInfo(DynamicData):
      files: list[FileInfo] = []
      remaining: int

   class FileTransferInformation(DynamicData):
      attributes: FileAttributes
      size: long
      url: str

   def MakeDirectory(self, vm: VirtualMachine, auth: GuestAuthentication, directoryPath: str, createParentDirectories: bool) -> NoReturn: ...
   def DeleteFile(self, vm: VirtualMachine, auth: GuestAuthentication, filePath: str) -> NoReturn: ...
   def DeleteDirectory(self, vm: VirtualMachine, auth: GuestAuthentication, directoryPath: str, recursive: bool) -> NoReturn: ...
   def MoveDirectory(self, vm: VirtualMachine, auth: GuestAuthentication, srcDirectoryPath: str, dstDirectoryPath: str) -> NoReturn: ...
   def MoveFile(self, vm: VirtualMachine, auth: GuestAuthentication, srcFilePath: str, dstFilePath: str, overwrite: bool) -> NoReturn: ...
   def CreateTemporaryFile(self, vm: VirtualMachine, auth: GuestAuthentication, prefix: str, suffix: str, directoryPath: Optional[str]) -> str: ...
   def CreateTemporaryDirectory(self, vm: VirtualMachine, auth: GuestAuthentication, prefix: str, suffix: str, directoryPath: Optional[str]) -> str: ...
   def ListFiles(self, vm: VirtualMachine, auth: GuestAuthentication, filePath: str, index: Optional[int], maxResults: Optional[int], matchPattern: Optional[str]) -> ListFileInfo: ...
   def ChangeFileAttributes(self, vm: VirtualMachine, auth: GuestAuthentication, guestFilePath: str, fileAttributes: FileAttributes) -> NoReturn: ...
   def InitiateFileTransferFromGuest(self, vm: VirtualMachine, auth: GuestAuthentication, guestFilePath: str) -> FileTransferInformation: ...
   def InitiateFileTransferToGuest(self, vm: VirtualMachine, auth: GuestAuthentication, guestFilePath: str, fileAttributes: FileAttributes, fileSize: long, overwrite: bool) -> str: ...