21 #include "Filesystem.h" 22 #include "pedigree/kernel/utilities/utility.h" 29 const String &name, Time::Timestamp accessedTime,
30 Time::Timestamp modifiedTime, Time::Timestamp creationTime, uintptr_t inode,
33 name, accessedTime, modifiedTime, creationTime, inode, pFs, size,
35 m_pCachedSymlink(0), m_sTarget()
45 if (m_sTarget.length() && !bForce)
48 size_t sz = getSize();
53 char *pBuffer =
new char[sz];
54 read(0ULL, sz, reinterpret_cast<uintptr_t>(pBuffer));
69 return m_pCachedSymlink;
73 m_pCachedSymlink = m_pFilesystem->
find(m_sTarget, m_pParent);
74 return m_pCachedSymlink;
81 if (m_sTarget.length() < bufLen)
82 bufLen = m_sTarget.length();
84 StringCopyN(pBuffer, static_cast<const char *>(m_sTarget), bufLen);
86 if (bufLen < m_sTarget.length())
87 pBuffer[bufLen] =
'\0';
void initialise(bool bForce=false)
virtual File * find(const StringView &path)
virtual bool isBytewise() const
virtual uint64_t read(uint64_t location, uint64_t size, uintptr_t buffer, bool bCanBlock=true) final