NAME
Git::Database::DirectoryEntry - A directory entry in Git
VERSION
version 0.007
SYNOPSIS
my $hello = Git::Database::DirectoryEntry->new(
mode => '100644',
filename => 'hello',
digest => 'b6fc4c620b67d95f953a5c1c1230aaab5db5a1b0'
);
my $tree = Git::Database::Object::Tree->new( directory_entries => [$hello] );
DESCRIPTION
Git::Database::DirectoryEntry represents a directory entry in a tree
object obtained via Git::Database from a Git object database.
ATTRIBUTES
mode
The mode of the directory entry, as a string (octal representation):
040000
-
a subdirectory (tree)
100644
-
a file (blob)
100755
-
an executable file for executable (blob)
120000
-
a symbolic link (the blob contains the path to the target file)
160000
-
a submodule (commit)
digest
The 40 character digest of the Git object pointed by the directory entry.
filename
The name of the directory entry.
METHODS
as_content
Return a string representing the directory entry in the format used for the content of tree object.
as_string
Return a string representing the directory entry in the same format as git ls-tree
.
is_tree
Return a boolean value indicating whether the directory entry points to a tree object.
is_blob
Return a boolean value indicating whether the directory entry points to a blob object.
is_executable
Return a boolean value indicating whether the directory entry has the executable switched.
is_link
Return a boolean value indicating whether the directory entry points to a a link. Note: a link is a blob.
is_submodule
Return a boolean value indicating whether the directory entry points to a a submodule. Note: a submodule is a blob.
SEE ALSO
Git::Database, Git::Database::Object::Tree.
AUTHOR
Philippe Bruhat (BooK) <book@cpan.org>.
COPYRIGHT
Copyright 2013-2016 Philippe Bruhat (BooK), all rights reserved.
LICENSE
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.