Skip to content

Commit

Permalink
add
Browse files Browse the repository at this point in the history
  • Loading branch information
farfun committed Dec 26, 2024
1 parent 594c165 commit 780aa49
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 3 deletions.
3 changes: 3 additions & 0 deletions logs/all.log
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
2024-12-26 16:52:47.994 |INFO | funbuild.core.core : core: 86 | funbuild | - fundrive build
2024-12-26 16:52:48.001 |INFO | funbuild.core.core : core: 74 | funbuild | - fundrive pull
2024-12-26 16:52:57.169 |INFO | funbuild.core.core : core: 78 | funbuild | - fundrive push
2024-12-26 17:05:02.674 |INFO | funbuild.core.core : core: 86 | funbuild | - fundrive build
2024-12-26 17:05:02.674 |INFO | funbuild.core.core : core: 74 | funbuild | - fundrive pull
2024-12-26 17:05:10.364 |INFO | funbuild.core.core : core: 78 | funbuild | - fundrive push
3 changes: 3 additions & 0 deletions logs/funbuild.log
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
2024-12-26 16:52:47.994 |INFO | funbuild.core.core : core: 86 | funbuild | - fundrive build
2024-12-26 16:52:48.001 |INFO | funbuild.core.core : core: 74 | funbuild | - fundrive pull
2024-12-26 16:52:57.169 |INFO | funbuild.core.core : core: 78 | funbuild | - fundrive push
2024-12-26 17:05:02.674 |INFO | funbuild.core.core : core: 86 | funbuild | - fundrive build
2024-12-26 17:05:02.674 |INFO | funbuild.core.core : core: 74 | funbuild | - fundrive pull
2024-12-26 17:05:10.364 |INFO | funbuild.core.core : core: 78 | funbuild | - fundrive push
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "fundrive"
version = "1.2.87"
version = "1.2.88"
description = "fundrive"
readme = "README.md"
requires-python = ">=3.8"
Expand Down
28 changes: 27 additions & 1 deletion src/fundrive/core/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,19 @@ def size(self):
return len(self.data)


def get_filepath(
filedir: str = None,
filename: str = None,
filepath: str = None,
) -> str:
if filepath is not None:
return filepath
elif filedir is not None and filename is not None:
return os.path.join(filedir, filename)
else:
return None


class BaseDrive:
def __init__(self, *args, **kwargs):
pass
Expand Down Expand Up @@ -94,12 +107,25 @@ def get_dir_info(self, fid, *args, **kwargs) -> DriveFile:
"""
raise NotImplementedError()

def download_file(self, fid, local_dir, overwrite=False, *args, **kwargs) -> bool:
def download_file(
self,
fid,
local_dir,
filedir=None,
filename=None,
filepath=None,
overwrite=False,
*args,
**kwargs,
) -> bool:
"""
下载文件
:param fid:
:param local_dir:
:param overwrite:
:param filename:
:param filepath:
:param filedir:
:param args:
:param kwargs:
:return:
Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 780aa49

Please sign in to comment.