From 35788f5ca981287b0e21b631d1c9ea658fdeded5 Mon Sep 17 00:00:00 2001 From: ruidajo Date: Thu, 3 Mar 2022 17:50:56 -0500 Subject: [PATCH] Implementing repository detection. --- repository/TiddlyWiki/TiddlyWiki.class.st | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/repository/TiddlyWiki/TiddlyWiki.class.st b/repository/TiddlyWiki/TiddlyWiki.class.st index 7901436..7731e0c 100644 --- a/repository/TiddlyWiki/TiddlyWiki.class.st +++ b/repository/TiddlyWiki/TiddlyWiki.class.st @@ -95,6 +95,18 @@ TiddlyWiki >> contentTiddlersWithoutLargeTiddlers [ ^ content. ] +{ #category : #accessing } +TiddlyWiki >> detectRepository [ + + | folder folderItems | + folder := self file parent. + folderItems := folder children. + [(folderItems select: [ :path | path fullName endsWith: '.fossil' ]) isEmpty] + whileTrue: [folder := folder parent. + folderItems := folder children.]. + ^ folder +] + { #category : #accessing } TiddlyWiki >> exportContentShadowAndLargeTiddlersSTONFiles [