How to search for directories in Artifactory API? - artifactory

I know how to list files in a specific path but I want to get a list of all directories. Is it possible ?

The easiest way is to use AQL.
For example, to find all folders in repo myrepo under the path foo/bar/, use the following query:
items.find({"repo":"myrepo","path":{"$match":"foo/bar/*"},"type":"folder"})

Related

Copy Just the Folder

I wanted to Copy just a single folder at a time from one location to another
Currently i hv to First go to the rename copy the name and come back to current location and create a new folder and paste the name
Just like TreeCopy Which copies folder complete structure
is there anything through which i can speed up this process and just generate a single folder from a 3000+ Collection of Folders
How can i copy just one folder from one location to another without copying anything inside it neither content nor sub folders.
if you know the way let me know.
I know how hectic that work can get, but luckily there's an easy way around this.
Type in the following command in command prompt(cmd).
I think you need to have administrator rights for this.
xcopy “c:\users\cdwyer\documents\OriginalFolder” “c:\users\cdwyer\documents\NewFolder” /T /E
The command is xcopy and it takes two parameters, the path of original folder and the path of new folder you want to create with the original folder structure.
/T is just another parameter that ensures to only copy the folder structure, not the files.
/E is another parameter you can include to make sure empty folders are created.
If you have any other queries, just go through this website.
https://camerondwyer.com/2013/07/05/how-to-copy-an-entire-folder-structure-without-copying-the-files-tip-for-starting-the-new-financial-year/

Folders in Gitlab?

I am trying to create folders in Gitlab through the web interface. I was able to see some repositories with folders. I could not find any option to create such folders. How are such folders created?
If you specified a path for a file, Gitlab will create directories if they not exists.
For example, if you add a file named dir1/dir2/test.md, Gitlab create two nested directories with test.md inside.

How to search within a particular folder in alfresco

I have folders in share shared folder. Is there any way to specify share to search for a particular file in particular folder of the shared folders?
Yes, but there is no user friendly out of the box solution (I know of).
As admin, go to http://your-host.domain.name/share/page/console/admin-console/node-browser and execute a (fts-alfresco) search like the following:
PATH:"/app:company_home/app:shared//*" AND #cm\:name:"filename.txt"
This will find all files named "filename.txt" below the shared folder.
I guess you will have to customize the search UI if you want to offer that functionality in a user friendly fashion or to non admin users.
Further details are at http://wiki.alfresco.com/wiki/Search#Path_Queries
We've developed a solutions where you can search within a folder through the advanced search form: http://addons.alfresco.com/addons/alfresco-share-folder-search
It's free for download so you can look around how it's done.
In short: in 4.2.e you can send an extra param rootNode to the /slingshot/search repo webscript.
If you check the client side JavaScript in Share components/search/search.js
There is method _buildSearchParams The following params are send: site={site}&term={term}&tag={tag}&maxResults={maxResults}&sort={sort}&query={query}&repo={repo}&rootNode={rootNode}&pageSize={pageSize}&startIndex={startIndex}
So fill in the rootNode with a qnamePath or NodeRef and it will present the results of that folder.
For a possible implementation, I wrote a long post about it on the alfresco community forum .

drupal path for multi sites environment

How to get path to sites DIR like i have sites/www.example.com i need to obtain this path inside a .tpl file of module, i tried drupal_get_path('theme','my_theme') and path_to_theme() but both of them point to the module DIR. any method that i can use to obtain path to my sites/example.com folder ?
Maybe the conf_path() will help you.
The question is, why do you need your sites/[site] directory?
maybe there's something misguided in your .tpl file. the drupal_get_path() should be sufficient.

Drupal search results filter, similar to drupal.org's search results page

Pretty new to drupal and I want to create a search results page that includes a filter, just like the one used on drupal.org (http://drupal.org/search/apachesolr_multisitesearch/test).
I've looked around for a module to do this, but haven't been able to locate one. Perhaps I'm not searching for the correct terms, but I've not had any luck.
Incase it matters, I have many nodes of content that are attached to a taxonomy of terms called "Tags" - I'd like to have the filter update the list of results based on the user selecting which "terms" to remove.
How are you accomplishing this?
TIA!
Edit:
Throwing in my install instructions for future travels:
Goto the following website: https://hudson.apache.org/hudson/job/Solr-trunk/lastSuccessfulBuild/artifact/checkout/solr/dist/
And find the nightly (Today’s date) build and download it.
Expand and rename the downloaded folder as “apache-solr-nightly”. This should NOT live in your webroot.
Download the zip here: http://solr-php-client.googlecode.com/files/SolrPhpClient.r22.2009-11-09.zip and unzip the file.
Download the zip here: http://ftp.drupal.org/files/projects/apachesolr-6.x-1.2.zip (Or the most current 6.x version) and unzip the file.
Copy the schema.xml from the apachesolr-6.x-1.2/ that was just unzipped to the apache-solr-nightly/example/solr/conf
Copy the solrconfig.xml from apachesolr-6.x.1.2/ to apache-solr-nightly/example/solr/conf
Edit the solrconfig.xml and include the following line as a child of
<luceneMatchVersion>LUCENE_40</luceneMatchVersion>
Search for and comment out the following lines
<queryResponseWriter name="xslt"
class="org.apache.solr.request.XSLTResponseWriter">
<int
name="xsltCacheLifetimeSeconds">5
</queryResponseWriter>
Change to the apache-solr-nightly/example directory and execute the solr jar
java -jar start.jar
drupal.org uses Apache Solr Search Integration (together with Apache Solr, of course).

Resources