Skip to content

Commit

Permalink
Add xbmcvfs mock
Browse files Browse the repository at this point in the history
  • Loading branch information
vkravets committed Aug 11, 2016
1 parent d5ed567 commit 207a743
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions kodiswift/mockxbmc/xbmcvfs.py
Original file line number Diff line number Diff line change
@@ -1 +1,20 @@
# -*- coding: utf-8 -*-

import os


def exists(target):
return os.path.exists(target)


def rename(origin, target):
return os.rename(origin, target)


def delete(target):
if os.path.isfile(target) and not os.path.isdir(target):
return os.unlink(target)
return False

def mkdir(target):
os.mkdir(target)

0 comments on commit 207a743

Please sign in to comment.