expunge exists entirely
[scpubgit/DKit.git] / lib / DX / Lib / FS.pm
index de452bc..c2be166 100644 (file)
@@ -31,17 +31,15 @@ our @RULES = (
     [ _path_status_at => qw(PS P) ] ],
 
   [ ps_prop => [ 'P', 'Name', 'Value' ],
-    [ exists => [ 'PS' ],
-      [ path_status_at => qw(PS P) ],
-      [ prop => qw(PS Name Value) ] ] ],
+    [ path_status_at => qw(PS P) ],
+    [ prop => qw(PS Name Value) ] ],
 
   [ ps_info_prop => [ 'P', 'Name', 'Value' ],
-    [ exists => [ 'PSI' ],
-      [ ps_prop => 'P', \'info', 'PSI' ],
-      [ prop => 'PSI', 'Name', 'Value' ] ] ],
+    [ ps_prop => 'P', \'info', 'PSI' ],
+    [ prop => 'PSI', 'Name', 'Value' ] ],
 
   [ exists_path => [ qw(P) ],
-    [ exists => [ qw(PSI) ], [ ps_prop => 'P' => \'info' => 'PSI' ] ] ],
+    [ ps_prop => 'P' => \'info' => 'PSI' ] ],
 
   [ _is_directory => [ qw(P) ],
     [ ps_info_prop => 'P' => \'is_directory' => \1 ] ],
@@ -86,24 +84,22 @@ our @RULES = (
     [ does => 'A', \'DX::Lib::FS::Action::CreateFile' ] ],
     
   [ mode => [ qw(P M) ],
-    [ exists => [ qw(PS A) ],
-      [ path_status_at => qw(PS P) ],
-      [ has_action => qw(PS A) ],
-      [ _action_is_creating => 'A' ],
-      [ react => [ qw(PS M) ], sub {
-          $_[0]->but(mode => $_[1]);
-        } ] ],
+    [ path_status_at => qw(PS P) ],
+    [ has_action => qw(PS A) ],
+    [ _action_is_creating => 'A' ],
+    [ react => [ qw(PS M) ], sub {
+        $_[0]->but(mode => $_[1]);
+      } ],
     [ 'cut' ] ],
 
   [ mode => [ qw(P M) ],
-    [ exists => [ qw(PS) ],
-      [ path_status_at => qw(PS P) ],
-      [ not => [ _mode => qw(P M) ] ],
-      [ act => [ qw(PS M) ], sub {
-         DX::Lib::FS::Action::SetPathMode->new(
-           path_status => $_[0], mode => $_[1]
-         )
-      } ] ],
+    [ path_status_at => qw(PS P) ],
+    [ not => [ _mode => qw(P M) ] ],
+    [ act => [ qw(PS M) ], sub {
+       DX::Lib::FS::Action::SetPathMode->new(
+         path_status => $_[0], mode => $_[1]
+       )
+    } ],
     [ 'cut' ] ],
 
   [ file_content => [ qw(FC) ],
@@ -127,17 +123,15 @@ our @RULES = (
     [ _file_content_at => qw(FC P) ] ],
 
   [ fc_prop => [ qw(P Name Value) ],
-    [ exists => [ 'FC' ],
-      [ file_content_at => qw(FC P) ],
-      [ prop => qw(FC Name Value) ] ] ],
+    [ file_content_at => qw(FC P) ],
+    [ prop => qw(FC Name Value) ] ],
 
   [ file_data => [ qw(P D) ], [ fc_prop => 'P', \'data', 'D' ] ],
 
   [ _contains_line => [ qw(P L) ],
     [ is_file => 'P' ],
-    [ exists => [ 'Lines' ],
-      [ fc_prop => 'P', \'lines', 'Lines' ],
-      [ member_of => qw(L Lines) ] ] ],
+    [ fc_prop => 'P', \'lines', 'Lines' ],
+    [ member_of => qw(L Lines) ] ],
 
   [ contains_line => [ qw(P L) ],
     [ _contains_line => qw(P L) ] ],
@@ -150,32 +144,29 @@ our @RULES = (
 
   [ contains_line => [ qw(P L) ],
     [ not => [ _contains_line => qw(P L) ] ],
-    [ exists => [ qw(FC A) ],
-      [ file_content_at => qw(FC P) ],
-      [ has_action => qw(FC A) ],
-      [ _action_modifying_fc => 'A' ],
-      [ react => [ qw(FC L) ], sub {
-          $_[0]->but_add($_[1])
-        } ] ],
+    [ file_content_at => qw(FC P) ],
+    [ has_action => qw(FC A) ],
+    [ _action_modifying_fc => 'A' ],
+    [ react => [ qw(FC L) ], sub {
+        $_[0]->but_add($_[1])
+      } ],
     [ 'cut' ] ],
 
   [ contains_line => [ qw(P L) ],
     [ not => [ _contains_line => qw(P L) ] ],
-    [ exists => [ qw(FC) ],
-      [ file_content_at => qw(FC P) ],
-      [ act => [ qw(FC L) ], sub {
-        DX::Lib::FS::Action::RewriteFile->new(
-          from => $_[0],
-        )->but_add($_[1])
-      } ] ] ],
+    [ file_content_at => qw(FC P) ],
+    [ act => [ qw(FC L) ], sub {
+      DX::Lib::FS::Action::RewriteFile->new(
+        from => $_[0],
+      )->but_add($_[1])
+    } ] ],
 
   [ not_contains_line => [ qw(P L) ],
     [ not => [ _contains_line => qw(P L) ] ] ],
 
   [ _arrange_removal_of => [ qw(FC L) ],
-    [ exists => [ 'A' ],
-      [ has_action => qw(FC A) ],
-      [ does => 'A' => \'DX::Lib::FS::Action::RewriteFile' ] ],
+    [ has_action => qw(FC A) ],
+    [ does => 'A' => \'DX::Lib::FS::Action::RewriteFile' ],
     [ react => [ qw(FC L) ], sub { $_[0]->but_remove($_[1]) } ] ],
 
   [ _arrange_removal_of => [ qw(FC L) ],
@@ -187,10 +178,8 @@ our @RULES = (
 
   [ not_contains_line => [ qw(P L) ],
     [ _contains_line => qw(P L) ],
-    [ exists => [ qw(FC) ],
-      [ file_content_at => qw(FC P) ],
-      [ _arrange_removal_of => qw(FC L) ],
-    ],
+    [ file_content_at => qw(FC P) ],
+    [ _arrange_removal_of => qw(FC L) ],
     [ 'cut' ] ],
 
   [ file_in => [ qw(DirPath FileName FilePath) ],