How to get the extreme root directory of a storage in Flutter? - flutter

I am currently using "path_provider package" of Flutter for getting the desired directories.
But as far as I am aware about this package. It only provides path to specific directories like :
TempDirectory.
AppLibraryDirectory.
etc ......
But what if I want a custom path ..... like the extreme root directory of a storage.( Whose child will be internal memory an sdcard kindoff). How can I get the path of this directory ? I thought of hardcoding specific paths like this one manually in my project but then won't the names of the directories vary based on the device manufacturer ?
I thought getExternalStorageDirectory() function might provide me the extreme root of external storage. But it provided me with this instead.
"/storage/emulated/0/Android/data/com.example.file_test/files".
when I wanted something like this : "/storage".
How can I do this ?
Thankyou for answering in advance.

Related

Programatically add images in simple product (using Object Manager Magento 2.3.7)

I'm using the Object Manager in order to add a few products from a csv (based on https://magecomp.com/blog/import-product-data-programmatically-magento-2/ ). So far everything is working and my images are temporarily stored in "var/tempImages/". When I pass that path into:
//$img is my path to "product.jpg", etc.
->setImage($img)
->setSmallImage($img)
->setThumbnail($img)
Images are not loading at all (doubled checked, they're in said path).
Any pointers on what could be missing to correctly map the path to image (or if I'm in something completely different).
Thanks.

Azure Factory v2 Wildcard

I am trying to create a new dataset in ADF that looks for csv files that meet a certain naming convention. These files are located within a series of different folders in my Azure Blob Storage.
For instance, in the sample directory below, I am trying to pull out csv files that contain the word "cars".
Folder A
fastcars.csv
fasttrucks.csv
Folder B
slowcars.csv
slowtrucks.csv
Ideally , I would end up with the files "slowcars.csv" and "fastcars.csv". I've seen examples out there were people were able to wildcard the file name. I have been playing around with that, but have had no luck. (See image below for one example of what I have been doing).
Is what I am trying to do even possible? Would appreciate any advice you guys may have. Please let me know if I can provide further clarification.
According to the description of filename in this documentation,
The file name under the given fileSystem + folderPath. If you want to
use a wildcard to filter files, skip this setting and specify it in
activity source settings.
so you need to specify it in activity not in file path.
A easy sample in copy activity:
Hope this can help you.

gcloud-java-storage Storage.BlobListOption.recursive(false) not working

I am trying to do an non-recursive list using gcloud-java storage on GCS bucket outside appengine based on this suggestion
However it seems that its not working as expected, namely it is still listing all the files although I have set the Storage.BlobListOption.recursive(false)
my code structure is basically like:
Storage client = StorageOptions.defaultInstance().service();
Page<Blob> blobPage = client.list(my_bucket, Storage.BlobListOption.recursive(false));
for (Blob blob : blobPage.values()) {
// it is still iterating all the leaf files in my_bucket
}
Actually later on I found that it seems that none of BlobListOption seems to be taking affect (maxResults, prefix) and list will just return all leaf files no matter what...
Am I using the API wrong or what might be the problem?
There was a bug with non-recusrive blob and prefix (folder) listing.
This was fixed in since v 0.1.15 (see this). The recursive option
was replaced with currentDirectory and now you can get the prefixes/child
folders. If this does not work for you or you think any of the other options does not work as intended please file an issue and it will be
taken care of quickly.

Are there any easy Read/write to file system from Metro Apps when the files are in nested folders

I'm working on a application that downloads some files to the local storage for caching. The files online are sometimes in 3 or 4 nested folders and I would like to also keep this hierarchy in my cache folder.
Is there no easy way other then having to (await (await folder.GetFolderAsync("dir1")).GetFolderAsync("dir2)) and so on? Now it's hardcoded with dir1 and dir2.
What's the easiest way when the file path is a string like "MyFolder/OtherFolder/lastFolder/file.xml"?
The static member function StorageFolder::GetFolderFromPathAsync can be used to get a StorageFolder object for a folder given its path.

how to give the default path in gwt

i m creating a project in gwt (point) is project name ...
i want to store a image in point/war/images folder, whaich i gave the full path like C:\Documents and Settings\computer\workspace\m\war\images\ tthe the iamge will stored in images folder but i want to give the default path
i give "../war/images/" as default path, but this give me error (he system cannot find the path specified )
can any body help to give the default path
Usually you put images in the war/images directory, and you access them like
Image img = new Image("images/my_image.jpg")
You may also read this thread, and this question.