Comments (5)
that's weird! ( swiftui Path
❤️ https://github.com/phimage/morphi )
did you try to do
import struct FileKit.Path
typealias FPath = FileKit.Path
in other file of your project, a file without SwiftUI? just to declare the alias and use it here
or add (based on https://stackoverflow.com/questions/39537103/is-it-possible-to-alias-an-import )
typealias Path = SwiftUI.Path
I do not think that aliased import exists ... (import struct FileKit.Path as FPath
)
from filekit.
maybe try to import the struct
import struct FileKit.Path
https://andybargh.com/lifetime-scope-and-namespaces-in-swift/
from filekit.
Fixed with 9e075da
from filekit.
import struct FileKit.Path
typealias FPath = FileKit.Path
import SwiftUI
hello, I use SwiftUI and FileKit together, and SwiftUI also has a struct named Path
.
The following code will report error
Binary operator '+(_:_:)' cannot be applied to operands of type 'Path' and 'String'
let outputPath = FPath.userDesktop + "output.mov"
from filekit.
@phimage thanks to replay, finally I add
import FileKit
import SwiftUI
//typealias FPath = FileKit.Path
typealias SPath = SwiftUI.Path
let outputPath = Path.userDesktop + "output.mov"
from filekit.
Related Issues (20)
- Feature Request: For adding/removing extended file attributes HOT 1
- Debugger support? HOT 1
- Codable doesn't conform to ReadableWritable HOT 1
- Path + String produces bad AnySequence result if Path ends with / and String starts with /
- Is there a way to write files to icloud using file kit? HOT 2
- Swift 4.1 Compatibility HOT 1
- 'pngData()' has been renamed to 'UIImagePNGRepresentation(_:)' HOT 1
- No way to get file base name (filename without extension)? HOT 4
- Need way to append a path extension without removing anything after a period HOT 1
- Pod version is older than latest release version. HOT 1
- Is there any way to encrypt a file ? HOT 1
- Please update cocoapods version to 6.0.0 HOT 5
- Deprecated method FileHandle.write(Data)
- Typo in ReadMe?
- CocoaPods extremely out-of-date (5.2 when it should be 6.0)
- Is there anyway to delete or clear contents of the file? HOT 1
- how to use it in SwiftUI
- Getting path of file used in other app
- Namespace issue with SwiftUI
- Add privacy manifest HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from filekit.