summaryrefslogtreecommitdiff
path: root/fs/commands/fsmkdir.py
blob: 32c6bd351ce8e960c81697320ca7e022f2e3ab26 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/env python

from fs.opener import opener
from fs.commands.runner import Command
import sys

class FSMkdir(Command):
    
    usage = """fsmkdir [PATH]
Make a directory"""

    version = "1.0"
    
    def do_run(self, options, args):
                
        for fs_url in args:                    
            fs, path = self.open_fs(fs_url, create=True)
            print fs, path                  
    
def run():
    return FSMkdir().run()
    
if __name__ == "__main__":
    sys.exit(run())