WinJS getFolderAsync with path parameter - windows-8

So the documentation for StorageFolder.GetFolderAsync says that the String parameter can be the name or the path relative to the current folder of the sub-folder to retrieve.
I can get the name to work just fine, but not the relative paths, e.g. for "localFolder/myFolder/mySubFolder/":
localFolder.getFolderAsync("myFolder/mySubFolder" or "/myFolder/mySubFolder").done( /* Your success and error handlers */ );
It works just fine if I chain getFolderAsync("myFolder") and getFolderAsync("mySubFolder").
What am I doing wrong?

add path like "Screenshots\Screenshot (3).png"
example:
localFolder.getFolderAsync("Screenshots\\Screenshot (3).png").done()

Related

showing error when accessing private property of ActivatedRoute in angular 5?

I am trying to store url paths into an array using 'activatedRoute.snapshot.url',it works nicely by storing the url paths into an array based on the '/' delimitor.But when I change my route into lazy loading it returns an empty array,after going through the properties of 'activatedRoute.snapshot' it returns the same results of 'activatedRoute.snapshot.url'(when using eager loading) in 'activatedRoute.snapshot._urlSegment.segments'
output
when I am using this property following error is shown in my terminal,but it also displays in my browser
ERROR in src/app/rcyc-components/rcyc-channels/rcyc-channels.component.ts(53,44): error TS2339: Property '_urlSegment' does not exist on type 'ActivatedRouteSnapshot'.
how can I solve this issue?Is there any other better way to get the current url paths into an array based on '/' seperator?
Try to use Location or Router services to extract URL from them.
https://angular.io/api/common/Location
https://angular.io/api/router/Router

Using Input Port in File List Component

I'm trying to pass a parameter into the File List component through input port 0. All of my attempts thus far have been met with an error,
Input edge has no effect. Disconnect edge or use metadata fields as parameters in Target URL, Source path or Target path.
Ideally, I would like the Target URL to be something along the lines of http://${S3_ACCESS_KEY}:${S3_SECRET_KEY}#${MY_BUCKET}.s3.amazonaws.com/reports/${port:0.value}/*_interestingReport.csv where ${port:0.value} is the value passed in from the input port.
What is the correct way to use data coming in on input port 0?
The way how passing parameters from input edge for File List (but other file components as well) works, is that you use the name of the metadata column from an input edge and enclose it between ${ and }.
So if the metadata on the edge have a field called directory, which contains the dir you want to use, this is the way how to do it.
http://${S3_ACCESS_KEY}:${S3_SECRET_KEY}#${MY_BUCKET}.s3.amazonaws.com/reports/${directory}/*_interestingReport.csv
Let me show you an example of a very simple graph which uses a 'Data Generator' that creates the flow and sends it as the input of a 'File List' component'.
http://www.filedropper.com/inputportfilelist_1
As you can see the way the input field is referenced is '${DATA_SOURCE_DIR}/${fileDir}/', being 'fileDir' the only field contained in the metadata of the link that connects both components. It'll basically list the files located in ${PROJECT}\data\source\manifests.
I hope this helps.

Recursive/Exploded uri variable with restlet

Does Restlet support exploded path variable (reference to URI Template RFC)?
An example would be /documents{/path*} where path can be for example "a/b/c/d/e".
This syntax doesn't seem to work with Restlet.
I'm creating a folder navigation api and I can have variable path depth, but I'm trying to have only one resource on the server side to handle all the calls. Is this something I can do with Restlet? I suppose I could create a custom router but if there is another way to do this I would like to know.
Thanks
It is possible to support this using matching modes.
For example:
myRouter.attach("/documents{path}",
MyResource.class).setMatchingMode(Template.START_WITH);
Hope this helps!
I'm doing the following
myRouter.attach("/documents/{path}", MyResource.class).setMatchingMode(Template.START_WITH);
Now I do get inside the resource GET method, but if I request the value of the path variable, I only get the first part (for example, /documents/a/b/c, path returns "a".) I use getRequest().getAttributes().get("path") to retrieve the value. Am I doing something wrong ?
Mathieu

Ember-Router: create route dynamically

I am trying to dynamically create a route to my router. I know there is serialize for doing this, but it appears to only accept a finite amount of parameters. For example, I need to be able to build a route that could be /:a or /:a/:b/:c.
My question is, is there a way to get what the original path request was?
I will need to:
get the original path
pause the router so an ajax call can be made to retrieve path info.
request from the server the path and return the module if it exists
(I have that much set up).
If path exists, create the route and move the application into that
state.
You can access the requested location via the router's location property.
You could then split the returned string and access the different parameters.
locationString = App.router.get('location.location.hash')
// something like "/1/2"
params = locationString.split(/\//)
param1 = params[1] // => "1"
param2 = params[2] // => "2"

How to use Dynamic Parameters value in ccnet file

I am using dynamic parameter to get value from user when he force build.User provides me publish directory path where i have to publish the solution if build is successful, so can any one please tell me how can i get this value in publishDir section.
Thanks in Advance.
u can refer your parameter by it's name, for example if your parameter name is pubdir then u can call it with following code.
$[pubdir] inside your publishdir section.