mirror of https://gitee.com/godoos/godoos.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
523 B
22 lines
523 B
// Copyright (c) seasonjs. All rights reserved.
|
|
// Licensed under the MIT License. See License.txt in the project root for license information.
|
|
|
|
package sd
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
)
|
|
|
|
func dumpSDLibrary(gpu bool) (*os.File, error) {
|
|
file, err := os.CreateTemp("", libName)
|
|
if err != nil {
|
|
return nil, fmt.Errorf("error creating temp file: %w", err)
|
|
}
|
|
defer file.Close()
|
|
|
|
if err := os.WriteFile(file.Name(), getDl(gpu), 0400); err != nil {
|
|
return nil, fmt.Errorf("error writing file: %w", err)
|
|
}
|
|
return file, nil
|
|
}
|
|
|