Browse Source

Add remove_file method to utils

doc-issue-template
MrS0m30n3 8 years ago
parent
commit
53f9f9f3ac
1 changed files with 6 additions and 0 deletions
  1. 6
      youtube_dl_gui/utils.py

6
youtube_dl_gui/utils.py

@ -106,6 +106,12 @@ os_path_expanduser = convert_on_bounds(os.path.expanduser)
if os.name == 'nt': if os.name == 'nt':
os_startfile = convert_on_bounds(os.startfile) os_startfile = convert_on_bounds(os.startfile)
def remove_file(filename):
if os_path_exists(filename):
os.remove(filename)
return True
return False
def remove_shortcuts(path): def remove_shortcuts(path):
"""Return given path after removing the shortcuts. """ """Return given path after removing the shortcuts. """

Loading…
Cancel
Save