       :else
       (str "Error: Path is not a directory: " path))))
 
+;; todo - switch to using pathlist
 (defn rm 
   "Removes a value"
   [key-name]
-  (let [path (resolve-path [key-name])
+  (let [path (resolve-single-path [key-name])
         v (get-in @FS_ROOT path)]
     (cond 
       (nil? v) 

(defn rmdir 
  "Removes a directory"
  [key-name]
  (let [path (resolve-path [key-name])
        v (get-in @FS_ROOT path)]
    (cond 
      (nil? v) 

(defn regex? 
  [r]
  (instance? java.util.regex.Pattern r))

(defn- get-absolute-path
  [path]
  (reduce 
    #(case %2
       :.. (pop %1) 
       :. %1
       (conj %1 %2))
    @CURRENT_DIR path))

(defn- resolve-path
  [parts]
