Commit 47379906 by willmcgugan

hide dotfiles fix from Andrew

parent 25df7c95
......@@ -1179,10 +1179,14 @@ class FS(object):
print_fs(self, max_levels=max_levels)
tree = printtree
def browse(self):
"""Displays the FS tree in a graphical window (requires wxPython)"""
def browse(self, hide_dotfiles=False):
"""Displays the FS tree in a graphical window (requires wxPython)
:param hide_dotfiles: If True, files and folders that begin with a dot will be hidden
"""
from fs.browsewin import browse
browse(self)
browse(self, hide_dotfiles)
def getmmap(self, path, read_only=False, copy=False):
"""Returns a mmap object for this path.
......
......@@ -183,12 +183,12 @@ def browse(fs, hide_dotfiles=False):
object. Double-click a file/folder to display extra info.
:param fs: A filesystem object
:param hide_fotfiles: If True, files and folders that begin with a dot will be hidden
:param hide_dotfiles: If True, files and folders that begin with a dot will be hidden
"""
app = wx.PySimpleApp()
frame = BrowseFrame(fs, hide_dotfiles=True)
frame = BrowseFrame(fs, hide_dotfiles=hide_dotfiles)
frame.Show()
app.MainLoop()
......@@ -196,4 +196,4 @@ def browse(fs, hide_dotfiles=False):
if __name__ == "__main__":
from osfs import OSFS
home_fs = OSFS("~/")
browse(home_fs)
browse(home_fs, True)
......@@ -78,4 +78,3 @@ def run():
if __name__ == "__main__":
sys.exit(run())
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment