oaDMFile
模块: oapy._oa._dm
导入: from oapy._oa import _dm
概览
oaDMFile 在 oapy 中可用,可通过 _dm 模块访问。
本页汇总 oaDMFile 当前在 oapy 中可用的 Python 接口。
详细说明
The oaDMFile class represents a managed file。 The oaDMFile class can be observed by deriving from oaObserver
方法总览
| 状态 | Python 调用 |
|---|---|
| ✅ | obj.destroy() |
| ✅ | obj.destroy(type) |
| ✅ | obj.getParent() |
| ✅ | obj.getName(name) |
| ✅ | obj.getPath(path) |
| ✅ | obj.getPath(type, path) |
| ✅ | obj.getLeader() |
| ✅ | obj.isLeader() |
| ✅ | obj.isPrimary() |
| ✅ | obj.existsOnDisk() |
| ✅ | obj.existsOnDisk(type) |
| ✅ | obj.getOnDiskSize() |
| ✅ | obj.setLeader(leader) |
| ✅ | obj.getLock() |
| ✅ | obj.releaseLock() |
| ✅ | obj.getLockStatus() |
| ✅ | obj.getVersion() |
| ✅ | obj.getFollowers() |
| ✅ | _dm.oaDMFile.find(parent, name) |
| ✅ | _dm.oaDMFile.create(parent, name, srcPath) |
| ✅ | _dm.oaDMFile.create(parent, name) |
方法说明
obj.destroy()
绑定状态: 已绑定
Python 调用: obj.destroy()
This function destroys the specified oaSaveRecoverType file。 An exception is thrown if the specified type is not found。
参数
type: Either oacAutoSaveType or oacCriticalSaveType。
异常
oacSaveRecoverFileDoesNotExistOnDisk。
Python 示例
from oapy._oa import _dm
# assume obj is a oaDMFile
obj.destroy()
obj.destroy(type)
绑定状态: 已绑定
Python 调用: obj.destroy(type)
This function destroys this oaDMFile。 This function requires write access to the library associated with this object (through a call to oaLib::getAccess )。 An oacLibAccessDenied exception is thrown if write access to the library does not exist。 For more information on library access, see Library Access in the detailed description for oaLib and OpenAccess 2.2 Libraries and Design Management in the Programmers Guide。
异常
oacLibAccessDenied。
Python 示例
from oapy._oa import _dm
# assume obj is a oaDMFile
obj.destroy(type)
obj.getParent()
绑定状态: 已绑定
Python 调用: obj.getParent()
This function returns the parent of this oaDMFile。 This function requires access to the library associated with this object (through a call to oaLib::getAccess )。 An oacLibAccessDenied exception is thrown if access to the library does not exist。 For more information on library access, see Library Access in the detailed description for oaLib and OpenAccess 2.2 Libraries and Design Management in the Programmers Guide。
异常
oacLibAccessDenied。
Python 示例
from oapy._oa import _dm
# assume obj is a oaDMFile
obj.getParent()
obj.getName(name)
绑定状态: 已绑定
Python 调用: obj.getName(name)
This function returns the name of this oaDMFile in the user-supplied name parameter。
Python 示例
from oapy._oa import _dm
# assume obj is a oaDMFile
obj.getName(name)
obj.getPath(path)
绑定状态: 已绑定
Python 调用: obj.getPath(path)
This function returns the path of the oaSaveRecoverType file that is specified。
参数
type: Either oacAutoSaveType or oacCriticalSaveType。name: The filename to match。
Python 示例
from oapy._oa import _dm
# assume obj is a oaDMFile
obj.getPath(path)
obj.getPath(type, path)
绑定状态: 已绑定
Python 调用: obj.getPath(type, path)
This function returns the path of the specified file。
参数
name: The filename to match。
Python 示例
from oapy._oa import _dm
# assume obj is a oaDMFile
obj.getPath(type, path)
obj.getLeader()
绑定状态: 已绑定
Python 调用: obj.getLeader()
This function returns the leader of this oaDMFile。 If this file is not a follower, NULL will be returned。 This function requires access to the library associated with this object (through a call to oaLib::getAccess )。 An oacLibAccessDenied exception is thrown if access to the library does not exist。 For more information on library access, see Library Access in the detailed description for oaLib and OpenAccess 2.2 Libraries and Design Management in the Programmers Guide。
异常
oacLibAccessDenied。
Python 示例
from oapy._oa import _dm
# assume obj is a oaDMFile
obj.getLeader()
obj.isLeader()
绑定状态: 已绑定
Python 调用: obj.isLeader()
This function returns true if this file is a leader file, with other files as its followers。
Python 示例
from oapy._oa import _dm
# assume obj is a oaDMFile
obj.isLeader()
obj.isPrimary()
绑定状态: 已绑定
Python 调用: obj.isPrimary()
This function returns true if this file is a primary file for a cellView。
Python 示例
from oapy._oa import _dm
# assume obj is a oaDMFile
obj.isPrimary()
obj.existsOnDisk()
绑定状态: 已绑定
Python 调用: obj.existsOnDisk()
This function destroys the specified oaSaveRecoverType file。 An exception is thrown if the specified type does not exist。
参数
type: Either oacAutoSaveType or oacCriticalSaveType。
异常
oacSaveRecoverFileDoesNotExistOnDisk。
Python 示例
from oapy._oa import _dm
# assume obj is a oaDMFile
obj.existsOnDisk()
obj.existsOnDisk(type)
绑定状态: 已绑定
Python 调用: obj.existsOnDisk(type)
This function returns true if this file exists on disk。
Python 示例
from oapy._oa import _dm
# assume obj is a oaDMFile
obj.existsOnDisk(type)
obj.getOnDiskSize()
绑定状态: 已绑定
Python 调用: obj.getOnDiskSize()
This function returns on disk size of the DM file。 If the file does not exist on disk, an error is thrown。
异常
oacDMFileDoesNotExistOnDisk。
Python 示例
from oapy._oa import _dm
# assume obj is a oaDMFile
obj.getOnDiskSize()
obj.setLeader(leader)
绑定状态: 已绑定
Python 调用: obj.setLeader(leader)
This function is used to set the specified oaDMFile leader as the leader for this oaDMFile。 Leader and follower files must belong to same parent。 OA does not support multiple levels of leader-follower relationships, so if the file is a leader, it cannot also be a follower。 A primary file can be a leader, but cannot be a follower。 Note: This function requires current write access to the library associated with this object (through oaLib::getAccess )。 An oacLibAccessDenied exception is thrown if write access to the library does not exist。 For more information on library access, see Library Access in the detailed description for oaLib 。
参数
leader: The specified leader file。
异常
oacCannotHaveMultiLevelFollowers。oacPrimaryCannotBeFollower。oacLeaderFollowerNotInSameParent。oacLibAccessDenied。
Python 示例
from oapy._oa import _dm
# assume obj is a oaDMFile
obj.setLeader(leader)
obj.getLock()
绑定状态: 已绑定
Python 调用: obj.getLock()
This function is used to get a write lock on the specified file。 If the lock is successfully obtained, true is returned; otherwise, false is returned。 Note: When a file is locked by the current or any other process and a lock is requested, the lock request is denied (this function returns false)。
Python 示例
from oapy._oa import _dm
# assume obj is a oaDMFile
obj.getLock()
obj.releaseLock()
绑定状态: 已绑定
Python 调用: obj.releaseLock()
This function is used to release a lock on the current file。
Python 示例
from oapy._oa import _dm
# assume obj is a oaDMFile
obj.releaseLock()
obj.getLockStatus()
绑定状态: 已绑定
Python 调用: obj.getLockStatus()
This function returns the lock status of this file。
Python 示例
from oapy._oa import _dm
# assume obj is a oaDMFile
obj.getLockStatus()
obj.getVersion()
绑定状态: 已绑定
Python 调用: obj.getVersion()
This function returns the current version of this file。
Python 示例
from oapy._oa import _dm
# assume obj is a oaDMFile
obj.getVersion()
obj.getFollowers()
绑定状态: 已绑定
Python 调用: obj.getFollowers()
This function is to get a collection of all of the followers of a file。 If this file does not have followers, the collection will be empty。 This function requires access to the library associated with this object (through a call to oaLib::getAccess )。 An oacLibAccessDenied exception is thrown if access to the library does not exist。 For more information on library access, see Library Access in the detailed description for oaLib and OpenAccess 2.2 Libraries and Design Management in the Programmers Guide。
异常
oacLibAccessDenied。
Python 示例
from oapy._oa import _dm
# assume obj is a oaDMFile
obj.getFollowers()
_dm.oaDMFile.find(parent, name)
绑定状态: 已绑定
Python 调用: _dm.oaDMFile.find(parent, name)
This function finds and returns the file with the specified name and parent if it exists。 If not found, NULL is returned。 This function requires access to the library associated with this object (through a call to oaLib::getAccess )。 An oacLibAccessDenied exception is thrown if access to the library does not exist。 For more information on library access, see Library Access in the detailed description for oaLib and OpenAccess 2.2 Libraries and Design Management in the Programmers Guide。
参数
parent: The parent of the file。name: The name of the file。
异常
oacLibAccessDenied。
Python 示例
from oapy._oa import _dm
_dm.oaDMFile.find(parent, name)
_dm.oaDMFile.create(parent, name, srcPath)
绑定状态: 已绑定
Python 调用: _dm.oaDMFile.create(parent, name, srcPath)
This function creates a new entry for the file with the specified name and parent。 An error is thrown if an oaDMFile already exists with the same name and parent。 Note: This function requires write access to the library associated with this object (through oaLib::getAccess )。 An oacLibAccessDenied exception is thrown if write access to the library does not exist。 For more information on library access, see Library Access in the detailed description for oaLib and OpenAccess 2.2 Libraries and Design Management in the Programmers Guide。
参数
parent: The parent of the file to be created。name: The name of the file to be created。
异常
oacDMFileExists。oacLibAccessDenied。
Python 示例
from oapy._oa import _dm
_dm.oaDMFile.create(parent, name, srcPath)
_dm.oaDMFile.create(parent, name)
绑定状态: 已绑定
Python 调用: _dm.oaDMFile.create(parent, name)
This function copies a file from the specified path into the library directory。 An exception is thrown if an oaDMFile already exists with the same name and parent。
参数
parent: The parent of the file to be created。name: The name of the file to be created。path: The path of the file to be copied from。
异常
oacDMFileExists。oacLibAccessDenied。
Python 示例
from oapy._oa import _dm
_dm.oaDMFile.create(parent, name)