Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
csst-dfs
csst-dfs-client
Commits
7600cd6f
Commit
7600cd6f
authored
Jan 03, 2025
by
Wei Shoulin
Browse files
local file validate
parent
aabe93dc
Pipeline
#7703
failed with stages
in 0 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
csst_dfs_client/plan.py
View file @
7600cd6f
...
@@ -84,6 +84,8 @@ def write_file(local_file: Union[IO, str], **kwargs) -> Result:
...
@@ -84,6 +84,8 @@ def write_file(local_file: Union[IO, str], **kwargs) -> Result:
Result: 操作的结果对象,包含操作是否成功以及相关的错误信息,成功返回数据对象。
Result: 操作的结果对象,包含操作是否成功以及相关的错误信息,成功返回数据对象。
"""
"""
if
local_file
is
None
:
raise
ValueError
(
"local_file is required"
)
if
isinstance
(
local_file
,
str
):
if
isinstance
(
local_file
,
str
):
if
not
os
.
path
.
exists
(
local_file
):
if
not
os
.
path
.
exists
(
local_file
):
raise
FileNotFoundError
(
local_file
)
raise
FileNotFoundError
(
local_file
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment