complete two way synchronization
[pub/Android/ownCloud.git] / src / com / owncloud / android / datamodel / FileDataStorageManager.java
index 7bb29d4..244d6d1 100644 (file)
@@ -72,7 +72,7 @@ public class FileDataStorageManager implements DataStorageManager {
         c.close();
         return file;
     }
-
+    
     @Override
     public OCFile getFileById(long id) {
         Cursor c = getCursorForValue(ProviderTableMeta._ID, String.valueOf(id));
@@ -83,6 +83,16 @@ public class FileDataStorageManager implements DataStorageManager {
         c.close();
         return file;
     }
+    
+    public OCFile getFileByLocalPath(String path) {
+        Cursor c = getCursorForValue(ProviderTableMeta.FILE_STORAGE_PATH, path);
+        OCFile file = null;
+        if (c.moveToFirst()) {
+            file = createFileInstance(c);
+        }
+        c.close();
+        return file;
+    }
 
     @Override
     public boolean fileExists(long id) {