llpyg os
This commit is contained in:
1448
py/os/gen.go
Normal file
1448
py/os/gen.go
Normal file
File diff suppressed because it is too large
Load Diff
22
py/os/os.go
22
py/os/os.go
@@ -22,9 +22,21 @@ import (
|
||||
"github.com/goplus/llgo/py"
|
||||
)
|
||||
|
||||
const (
|
||||
LLGoPackage = "py.os"
|
||||
)
|
||||
// https://docs.python.org/3/library/os.html
|
||||
|
||||
//go:linkname Getcwd py.getcwd
|
||||
func Getcwd() *py.Object
|
||||
// Rename the file or directory src to dst. If dst exists, the operation will
|
||||
// fail with an OSError subclass in a number of cases:
|
||||
//
|
||||
// On Windows, if dst exists a FileExistsError is always raised. The operation
|
||||
// may fail if src and dst are on different filesystems. Use shutil.move() to
|
||||
// support moves to a different filesystem.
|
||||
//
|
||||
// On Unix, if src is a file and dst is a directory or vice-versa, an IsADirectoryError
|
||||
// or a NotADirectoryError will be raised respectively. If both are directories and dst
|
||||
// is empty, dst will be silently replaced. If dst is a non-empty directory, an OSError
|
||||
// is raised. If both are files, dst will be replaced silently if the user has permission.
|
||||
// The operation may fail on some Unix flavors if src and dst are on different filesystems.
|
||||
// If successful, the renaming will be an atomic operation (this is a POSIX requirement).
|
||||
//
|
||||
//go:linkname Rename py.rename
|
||||
func Rename(src, dst *py.Object) *py.Object
|
||||
|
||||
Reference in New Issue
Block a user