POSIX: different inode for same named different file types

This commit is contained in:
chrislu
2022-01-12 11:51:13 -08:00
parent e82ad60122
commit fec8428fd8
9 changed files with 63 additions and 38 deletions

View File

@@ -4,6 +4,7 @@ import (
"context"
"errors"
"fmt"
"os"
"strings"
"github.com/chrislusf/seaweedfs/weed/glog"
@@ -16,6 +17,13 @@ func (entry *Entry) IsInRemoteOnly() bool {
return len(entry.Chunks) == 0 && entry.RemoteEntry != nil && entry.RemoteEntry.RemoteSize > 0
}
func (entry *Entry) FileMode() (fileMode os.FileMode) {
if entry != nil && entry.Attributes != nil {
fileMode = os.FileMode(entry.Attributes.FileMode)
}
return
}
func ToFileIdObject(fileIdStr string) (*FileId, error) {
t, err := needle.ParseFileIdFromString(fileIdStr)
if err != nil {