MCPcopy Create free account
hub / github.com/featureform/featureform / CreateFilePath

Method CreateFilePath

provider/filestore.go:1041–1060  ·  view source on GitHub ↗
(key string)

Source from the content-addressed store, hash-verified

1039}
1040
1041func (store *genericFileStore) CreateFilePath(key string) (filestore.Filepath, error) {
1042 fp := filestore.FilePath{}
1043 if store.FilestoreType() != filestore.FileSystem {
1044 return nil, fmt.Errorf("filestore type: %v; use store-specific implementation instead", store.FilestoreType())
1045 }
1046 if err := fp.SetScheme(filestore.FileSystemPrefix); err != nil {
1047 return nil, err
1048 }
1049 if err := fp.SetBucket(store.path.Bucket()); err != nil {
1050 return nil, err
1051 }
1052 if err := fp.SetKey(key); err != nil {
1053 return nil, err
1054 }
1055 if err := fp.Validate(); err != nil {
1056 return nil, err
1057 }
1058 fp.SetIsDir(false)
1059 return &fp, nil
1060}

Callers 1

CreateDirPathMethod · 0.95

Calls 7

FilestoreTypeMethod · 0.95
SetSchemeMethod · 0.95
SetBucketMethod · 0.95
SetKeyMethod · 0.95
ValidateMethod · 0.95
SetIsDirMethod · 0.95
BucketMethod · 0.65

Tested by

no test coverage detected