Folder with custom files (json, txt) in dart project (Aqueduct) - dart

I create dart web server on aqueduct. And i want add into project my custom file (f.e. in json format) and read in dart code. In which folder i can put my own custom non-dart files?
Thanks

You can put your non-Dart files into any directory, even alongside your Dart files. Just put them wherever makes most sense to you for your project.

Related

Opening Sibling Files in Document Based iOS App

I want to have a custom project file that a user selects in a UIDocumentBrowserViewController. That project file would then reference files in the same directory which would be opened and written to programmatically. I can't seem to get access to the project's sibling files programmatically (presumably due to sandbox restrictions). What's the best way to get this to work?
I ended up making the enclosing folder a document package, i.e. a folder that shows up in the file browser as a single file. I then had access to read all the files in it.
https://developer.apple.com/library/content/documentation/CoreFoundation/Conceptual/CFBundles/DocumentPackages/DocumentPackages.html

Save multiple files as one package with custom file type

I need to save multiple files as one custom file, which then can be exported and imported into the iOS app. The files that go into this package are PDFs and TXTs.
A .pages file on the Mac is pretty much exactly what I want, it is a package which contains the original files, but acts as a custom (Pages) file.
I looked into NSFileWrapper, NSKeyedArchiver and NSFileManager, but I can't find the right way to solve this problem. How can I export multiple files into one package on iOS, that I can save with my own file extension and where I can easily get the original files out when importing?

Dart project structure for apps (not libs)

I am trying to understand Dart's recommended project structure and not seeing the "forest through the trees".
So, if my project is intended to be a reusable library, say, a logging framework of some sort, then if I understand the above link correctly, I want all of my development to be under a lib and lib/src directory.
But what if I am building a web app? Where do my Dart source files go? Under packages? Specifically:
Where do I place Dart source files for a web app (not a lib)?
Are my web app's "packages" just directories that are logically organized similar to Java packages?
Does Dart recommend a 1-class-per-file convention for its source code?
1)
your_app_package/web
your_app_package/web/src/xxx
static content like jpg, css go to
* your_app_package/asset
2) the packages directory is maintained automatically. You configure in the file pubspec.yaml which 3rd party libraries you want to use and then call pub get or pub upgrade and the packages directory is updated automatically (the Darteditor does this automatically when you update pubspec.yaml).
3) not that I know of.
I had some problems putting additional classed in the code file of a Polymer element though. But I guess this is just a temporary limitation of Polymer.

Polymer Dart package layout conventions?

I'm currently working on a project which contains a number of components (polymer elements). All said and done, I'll probably be looking at around 10+ components for the application. At the moment, following Pub's Package Layout Conventions each .html and associated .dart file is in the web/ directory.
It would be nice to have them in lib/src/ of my application and only have the main files in web/ however at the moment <link ref="import" href="package:my_app/src/my_component.html"> will not work (See Issue 12867).
Are there currently any conventions in use to handle multiple (private) components for an app? Should I create a web/src/ directory to load imports/source files relative to the web/ directory? Would it even make sense to keep Polymer Element .html files in lib/src/ (assuming it was supported) as they're not pure dart files as traditionally recommended/expected in a pub package layout?
As far as I understand, package: works only for external components (dependencies declared in pubspec.yaml), and the default path is the packages folder (created by pub install). See the getting started section here: Dart Pub
I keep components in their own folders under the web directory so web/component1, web/component2 and so on and I use relative links to import across components. Not sure if this is the best practice but it works.

How to attach a rtf or doc file with Blackberry Application

I have requirement to attach a doc file or a .rtf file with my project source code as a resource.
I want to invoke it on application installation time after saving permission.
I am working on a backgroung application not on a Ui application.
I dont have no idea about how to attach these files with source code and use them.
You can treat these files as a resource to the project and place them in the resource folder and package the project.
Thanks
Naveen M

Resources