Xgit v0.1.0 Xgit.Core.ValidateObject
Verifies that an object is formatted correctly.
Verifications made by this module only check that the fields of an object are formatted correctly. The object ID checksum of the object is not verified, and connectivity links between objects are also not verified. It's assumed that the caller can provide both of these validations on its own.
Link to this section Summary
Functions
Verify that a proposed object is valid.
Link to this section Functions
Link to this function
check(object, opts \\ [])
check(object, opts \\ [])
check(object :: Xgit.Core.Object.t(), opts :: Keyword.t()) ::
:ok | {:error, reason :: String.t()}
check(object :: Xgit.Core.Object.t(), opts :: Keyword.t()) :: :ok | {:error, reason :: String.t()}
Verify that a proposed object is valid.
Options
By default, this function will only enforce Posix file name restrictions.
:macosx?
:true
to also enforce Mac OS X file name restrictions:windows?
:true
to also enforce Windows file name restrictions
Return Value
:ok
if the object is successfully validated.
{:error, "reason"}
if the object can not be validated.