Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6788327
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T17:28:21+00:00 2026-05-26T17:28:21+00:00

I use xmlrpclib, wsapi4plone to connect to plone: client = xmlrpclib.ServerProxy(‘http://user:password@blah.com/plone’) is there a

  • 0

I use xmlrpclib, wsapi4plone to connect to plone:

client = xmlrpclib.ServerProxy('http://user:password@blah.com/plone')

is there a method to check if a folder on plone exists by its url? something like: client.exists('/sites/ng/path/to/folder')
What I did is a bit of cheating:

try:    
    client.get_types('/sites/ng/path/to/folder')
except:
    #if there's an exception, that means there's no folder -> create it here
    client.post_object(folder)

I dont have the admin rights so i can’t look at the methods list (which I was told that it’s somewhere on the plone site but I need to be the admin). I don’t want to keep having to ask question on here about what method is available, is there a plone’s methods list anywhere on the web?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T17:28:22+00:00Added an answer on May 26, 2026 at 5:28 pm

    A fast solution is to query the catalog, like this:

    client = xmlrpclib.ServerProxy('http://user:password@blah.com/plone')
    completePath = '/'.join(client.getPhysicalPath()) + '/sites/ng/path/to/folder'
    if len(client.portal_catalog.searchResults(path=completePath)):
        return True
    

    Another solution could be to traverse the folders structure like this:

    client = xmlrpclib.ServerProxy('http://user:password@blah.com/plone')
    path = '/sites/ng/path/to/folder'
    subdirs = path.split('/')[1:]
    dir = client
    for subdir in subdirs:
        if subdir in dir.objectIds():
            dir = dir[subdir]
        else:
            return False
    return True
    

    edit:

    I have to ammend my answer. I tried to interact with the portal_catalog via xmlrpc and actually it’s not so easy. My two options are good, but not for use via xmlrpc. So, taking as example transmogrify.ploneremote, a simple option (not very different from your implementation) for checking if a remote folder exists is this:

    try:
       path = 'http://user:password@blah.com/plone/sites/ng/path/to/folder'
       xmlrpclib.ServerProxy(path).getPhysicalPath()
       return True
    except xmlrpclib.Fault, e:
       return False
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use xmlrpclib, wsapi4plone to upload stuff to plone. Say I'm going to create
use Control::CLI; $cli = new Control::CLI('SSH'); $cli->connect(Host=>'10.10.10.10',Username=>'user',Password=>'pwd'); $cli->waitfor('>'); $cli->print('Show XXXXXXXXXXXXXXXXXXXX| grep Active'); @f=$cli->waitfor('>'); print
Use case: User launches app The user enters google password The app lets the
Use http://jobs.sitesixteen.com/ for reference. I'm using YQL for the city, state auto-complete. IF you
'''use Jython''' import shutil print dir(shutil) There is no, shutil.move, how does one move
Use case: user clicks the link on a webpage - boom! load of files
use LWP::Simple; use Parallel::ForkManager; @links=( [http://prdownloads.sourceforge.net/sweethome3d/SweetHome3D-2.1-windows.exe,SweetHome3D-2.1-windows.exe], [http://prdownloads.sourceforge.net/sweethome3d/SweetHome3D-2.1-macosx.dmg,SweetHome3D-2.1-macosx.dmg], [http://prdownloads.sourceforge.net/sweethome3d/SweetHome3DViewer-2.1.zip,SweetHome3DViewer-2.1.zip], ); # Max 30 processes for
Use Case When a user goes to my website, they will be confronted with
Use case example: Client A comes to request sales information, enters their zip code
Use: The user searches for a partial postcode such as 'RG20' which should then

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.