]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - fs/sandbox/sandboxfs.c
sandbox: implement exists() function
[karo-tx-uboot.git] / fs / sandbox / sandboxfs.c
index dd028da8e32bbafaea23129b418cd319aaa0677e..85079788c990f712f8711b947539e2886d8684e9 100644 (file)
@@ -72,6 +72,14 @@ int sandbox_fs_ls(const char *dirname)
        return 0;
 }
 
+int sandbox_fs_exists(const char *filename)
+{
+       ssize_t sz;
+
+       sz = os_get_filesize(filename);
+       return sz >= 0;
+}
+
 void sandbox_fs_close(void)
 {
 }