Skip to content

Commit

Permalink
Merge pull request #11 from htgt/redmine_12596/check_file_existence
Browse files Browse the repository at this point in the history
Redmine 12596/check file existence
  • Loading branch information
bethsampher committed Jan 6, 2020
2 parents 944f0fa + d45816a commit 73cb4cb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/WebAppCommon/Util/FileAccess.pm
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ sub delete_dir {
return $dir->rmtree;
}

sub check_file_existence {
my ( $self, $path ) = @_;
return -e $path;
}

sub construct {
my ( $class, $args ) = @_;
return $args->{server}
Expand Down
5 changes: 5 additions & 0 deletions lib/WebAppCommon/Util/RemoteFileAccess.pm
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,11 @@ sub delete_dir {
return 0;
}

sub check_file_existence {
my ( $self, $path ) = @_;
return $self->scp->size($path);
}

1;


0 comments on commit 73cb4cb

Please sign in to comment.