syscall: Stat_t for js/wasip1
This commit is contained in:
24
runtime/internal/clite/syscall/fs_wasip1.go
Normal file
24
runtime/internal/clite/syscall/fs_wasip1.go
Normal file
@@ -0,0 +1,24 @@
|
||||
// Copyright 2023 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build wasip1
|
||||
|
||||
package syscall
|
||||
|
||||
type Stat_t struct {
|
||||
Dev uint64
|
||||
Ino uint64
|
||||
Filetype uint8
|
||||
Nlink uint64
|
||||
Size uint64
|
||||
Atime uint64
|
||||
Mtime uint64
|
||||
Ctime uint64
|
||||
|
||||
Mode int
|
||||
|
||||
// Uid and Gid are always zero on wasip1 platforms
|
||||
Uid uint32
|
||||
Gid uint32
|
||||
}
|
||||
@@ -310,14 +310,3 @@ func hasPrefix(s, prefix string) bool {
|
||||
func hasSuffix(s, suffix string) bool {
|
||||
return len(s) >= len(suffix) && s[len(s)-len(suffix):] == suffix
|
||||
}
|
||||
|
||||
type Stat_t struct {
|
||||
Dev uint64
|
||||
Ino uint64
|
||||
Filetype uint8
|
||||
Nlink uint64
|
||||
Size uint64
|
||||
Atime uint64
|
||||
Mtime uint64
|
||||
Ctime uint64
|
||||
}
|
||||
|
||||
26
runtime/internal/clite/syscall/syscall_js.go
Normal file
26
runtime/internal/clite/syscall/syscall_js.go
Normal file
@@ -0,0 +1,26 @@
|
||||
// Copyright 2018 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build js && wasm
|
||||
|
||||
package syscall
|
||||
|
||||
type Stat_t struct {
|
||||
Dev int64
|
||||
Ino uint64
|
||||
Mode uint32
|
||||
Nlink uint32
|
||||
Uid uint32
|
||||
Gid uint32
|
||||
Rdev int64
|
||||
Size int64
|
||||
Blksize int32
|
||||
Blocks int32
|
||||
Atime int64
|
||||
AtimeNsec int64
|
||||
Mtime int64
|
||||
MtimeNsec int64
|
||||
Ctime int64
|
||||
CtimeNsec int64
|
||||
}
|
||||
Reference in New Issue
Block a user