oaDir
模块: oapy._oa._base
导入: from oapy._oa import _base
概览
oaDir 在 oapy 中可用,可通过 _base 模块访问。
本页汇总 oaDir 当前在 oapy 中可用的 Python 接口。
详细说明
The oaDir utility class implements a class for managing a file system component that is a directory。
构造函数
_base.oaDir(nameIn)
obj = _base.oaDir(nameIn)
方法总览
| 状态 | Python 调用 |
|---|---|
| ✅ | obj.create() |
| ✅ | obj.exists() |
| ✅ | obj.isEmpty() |
| ✅ | obj.isCWD() |
方法说明
obj.create()
绑定状态: 已绑定
Python 调用: obj.create()
This function creates the directory on disk。 It assumes that the directory does not exist。
异常
oacDirCreateFailed。
Python 示例
from oapy._oa import _base
# assume obj is a oaDir
obj.create()
obj.exists()
绑定状态: 已绑定
Python 调用: obj.exists()
This function returns true if the file system object associated with the name exists on disk and is a directory。 从 oaFSComponent 重新实现。
Python 示例
from oapy._oa import _base
# assume obj is a oaDir
obj.exists()
obj.isEmpty()
绑定状态: 已绑定
Python 调用: obj.isEmpty()
This function returns true if this directory does not contain any files or subdirectories。
Python 示例
from oapy._oa import _base
# assume obj is a oaDir
obj.isEmpty()
obj.isCWD()
绑定状态: 已绑定
Python 调用: obj.isCWD()
This function returns true if the directory is the current working directory。
Python 示例
from oapy._oa import _base
# assume obj is a oaDir
obj.isCWD()